Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi all,
I have a measure that functions properly when the table is filtered for last year (2022).
But, for the Current Year (2023), I only intended to display % using the same measure while omitting YTG months.
Accuracy =
VAR Result = 1-( DIVIDE( [Variance Month], [Sales], 0 ) )
VAR MonthSelect = IF(AND(SELECTEDVALUE(dimDate[Year]) >= YEAR(TODAY()), SELECTEDVALUE(dimDate[Month]) >= MONTH(TODAY())),0,1)
RETURN
IF( MonthSelect = 1, Result, "-")
Not getting correct values as Total based for 2023 using above measure. Current Year total should ignore YTG (or - in this case)
BUT for 2022 ALL correct:
Thanks
@mb0307 Difficult to say without mocking things up. Any chance you can share the PBIX? Could be a measure totals problem but not sure. First, please vote for this idea: https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e
This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
Also: https://youtu.be/uXRriTN0cfY
And: https://youtu.be/n4TYhF2ARe8
@Greg_Deckler Thanks Greg.
PBIX download link is provided in the post.
DOWNLOAD PBIX
Please check if you can help with a measure called Accuracy.
Thanks in advance.
@mb0307 Ah, so the issue is that you are including Forecasted values for 2023 for future months. So that is what is throwing your calculations off for the current year. You will need to modify your Forecast measure to only sum the values that are < TODAY(). You can do this with a SUMX and a FILTER statement.
User | Count |
---|---|
89 | |
73 | |
68 | |
64 | |
56 |
User | Count |
---|---|
103 | |
94 | |
74 | |
60 | |
59 |