Quantcast
Channel: Service topics
Viewing all articles
Browse latest Browse all 61866

Multiply rows of two category based on different datetime frequency

$
0
0

Hello,

 

I need the following scenario to be achieved in Direct query mode. I was able to achieve it in Data Import mode but in Direct Query I see that the transformations and DAX formulas are quite limited.

 

Scenario:

I have a table with data of two of more categories. The data of two categories is logged at different frequency of time. I need to create a report or visualization which displays the product of values of two categories based on the timestamp value. For the timestamps where the less frequent data doesn't have a value, the most recent value available should be used. Following is the sample of data and expected output:

 

TimeStampCategoryCat_Value
2017-03-19 07:00:00.000A10
2017-03-19 07:15:00.000A10.5
2017-03-19 07:30:00.000A10.3
2017-03-19 07:00:00.000B5.1
2017-03-19 07:05:00.000B5.3
2017-03-19 07:10:00.000B5.4
2017-03-19 07:15:00.000B5.2
2017-03-19 07:20:00.000B5.6
2017-03-19 07:25:00.000B5
2017-03-19 07:30:00.000B5.5

 

Output Expected  
 Product (A,B)
2017-03-19 07:00:00.0005.1 * 10
2017-03-19 07:05:00.0005.3 * 10
2017-03-19 07:10:00.0005.4 * 10
2017-03-19 07:15:00.0005.2 * 10.5
2017-03-19 07:20:00.0005.6 * 10.5
2017-03-19 07:25:00.0005 * 10.5
2017-03-19 07:30:00.0005.5 * 10.3

 

 

Please suggest on how it can be done.

 

Thanks,

Vaishali


Viewing all articles
Browse latest Browse all 61866

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>