Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi, I have a measure to calculate the Volume Impact. But it is incorrect when the [Volume Sum] is blank.
If the [Volume Sum] is blank, it should be set as 0.
For example, Product A in 2020-10, the Volume Impact should be (0-1)*313 = -313 but it shows 395 which is incorrect.
The [Volume Impact Total] should has the same value as [Revenue YoY] for those lines highlighted in red.
How to fix the measure? Here is the pbix file.
Solved! Go to Solution.
Hi,
Try these measures
Measure = ([Volume Sum]-[Volume last year])*[AUSP Last Year]
Measure 2 = if(HASONEFILTER('Calendar'[YearMonth]),[Measure],sumx(summarize('Calendar','Calendar'[YearMonth],"ABCD",[Measure]),[ABCD]))
The Grand total does not match but am unable to find out my mistake.
Hope this helps.
HI @PBI_newuser
This is related with the fact that the values are blank has you refer you can do one of two things for the Volume Last Year metrics to be 0 in the measure it self or within the other metric.
To force the metric it self change it to:
Volume last year = CALCULATE([Volume Sum],SAMEPERIODLASTYEAR('Calendar'[Date])) + 0
This however makes the measure to be always 0 and not blank so will present on other rows that you may not want it.
The second option is to redo your Total volume to the following:
Volume Impact =
var TotalSalesCalculation =[Volume Last Year] + 0
Return
IF (
MIN ( 'Calendar'[Date] ) > MAX ( 'Append Table'[Date] ),
CALCULATE (
SUMX (
SUMMARIZE ( 'Append Table', 'Calendar'[YearMonth] ,'Append Table'[Product]),
IF (
TotalSalesCalculation <= 0,
( [Revenue] - [Revenue Last Year] ),
( [Volume Sum] - TotalSalesCalculation ) * [AUSP Last Year]
)),
SAMEPERIODLASTYEAR ( 'Calendar'[Date] )
)*-1,
SUMX (
SUMMARIZE ( 'Append Table', 'Calendar'[YearMonth],'Append Table'[Product] ),
IF (
TotalSalesCalculation <= 0,
( [Revenue] - [Revenue Last Year] ),
( [Volume Sum] - TotalSalesCalculation ) * [AUSP Last Year]
) ))
Has you can see we are calculation the Volume Last Year and adding the 0 so them you can compare it and get expected result.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @MFelix , thank you for the modified measures. After applying the suggested measures, the value doesn't seem correct too. [Volume Impact] for product A supposed to have same value as [Revenue YoY].
Did you do + 0 or =0
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsAccess Denied message.
Hi,
Try these measures
Measure = ([Volume Sum]-[Volume last year])*[AUSP Last Year]
Measure 2 = if(HASONEFILTER('Calendar'[YearMonth]),[Measure],sumx(summarize('Calendar','Calendar'[YearMonth],"ABCD",[Measure]),[ABCD]))
The Grand total does not match but am unable to find out my mistake.
Hope this helps.
User | Count |
---|---|
80 | |
74 | |
62 | |
61 | |
45 |
User | Count |
---|---|
108 | |
97 | |
88 | |
81 | |
61 |