Forum Discussion
Import measure definition from Power Bi Model
Hi,
I am fairly new to the world of SSRS so this may be a stupid question...
When I create a dataset from a Power BI data source I can import both my columns and my measures. For instance consider the following:
The [Group], [ID], [Forecast] and [Actual] are columns.
The [Variance] and [Variance %] are dax measures.
| Group | ID | Forecast | Actual | Variance | Variance % |
| A | 1 | 10 | 5 | -5 | -50% |
| A | 2 | 100 | 33 | -67 | -67% |
| B | 3 | 25 | 30 | 5 | 20% |
When I import the measure is being calculated for each row, effectively becoming a calculated column as apposed to a measure definition.
Therefore when I try and create a pivot from this data it is aggregating (in the case below summing) my measures. This is fine for most but not for [Variance %]. What I want is my measures to calculate as per the current evaluation context like it would in Power Bi. Is this possible? I see I can create a Calculated Field the get my desired result but I have 100+ measures. Do I have to re-create them or is there some way to just import the measure definition?
| Group | ID | Sum of Forecast | Sum of Actual | Sum of Variance | Sum of Variance % |
| A | 1 | 10 | 5 | -5 | -50% |
| 2 | 100 | 33 | -67 | -67% | |
| A Total | 110 | 38 | -72 | -117% (wrong should be -65%) | |
| B | 3 | 25 | 30 | 5 | 20% |
| B Total | 25 | 30 | 5 | 20% | |
| Grand Total | 135 | 68 | -67 | -97% (wrong should be -50%) |
Thanks in advance!
Ben