The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Dear all,
For the report that I am creating, I have multiple charts. 1 should show only the value of the highest selected month & year, 1 should show the value of MTD, QTD or YTD, and 1 should show all values from start to the last date.
Now the MTD, QTD & YTD and all the astart to end is not an issue. But to get the values for only the selected year / month I don't get it to work.
I have 2 measures for the highest selected year and 1 for the highest selected month, which indeed are showing the correct value in the card. However, when I add those in the matrix, the highest selected month and the year, is not the actual highest selected month and the year. But the month and the year are basicly the year and month of the calendar, which are not the highest selected.
How can I make it so, that I am getting the actual highest selected year & month, so I can use those in the formula? The max isn't working and I also can't use the all or allselected.
As you can see in the sceenprint, in the matrix the highest selected month and year are not the same as in the card.
Please find here also the example power bi I have created; Test Power Bi
Thanks in advance,
Regards,
Hans
Solved! Go to Solution.
You can use
_Highest Month = CALCULATE( MAX(mapCalendar[Month]), ALLSELECTED(MapCalendar) )
_Highest Selected Year = CALCULATE( MAX(mapcalendar[year]), ALLSELECTED(MapCalendar) )
You can use
_Highest Month = CALCULATE( MAX(mapCalendar[Month]), ALLSELECTED(MapCalendar) )
_Highest Selected Year = CALCULATE( MAX(mapcalendar[year]), ALLSELECTED(MapCalendar) )
Hello Johnt75,
Thank you very much, I was suffering for days to get this done. And I did use the max and did try with the allselected, but I didn't think about using the calculate, which surely does make sense.
Thanks again for the help, very appreciated.
Regards,
Hans