Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello
i need help with the DAX code for a card in my dashboard.
I want to make 2 cards in my POWER BI dashboard, but can't get it to work.
I wanted to show the highest Value column counter, excluding all the values that have something written in the error column. So the maximum value would be 12.
Also so the last entry in the column, and if it's possible anchor it to the date. So even if the database isn't sorted by date, it is still the last according to date.
Hope someone can help
Regards
Ratax
Solved! Go to Solution.
You may use TOPN Function.
Measure =
MAXX (
TOPN ( 1, FILTER ( Table1, ISBLANK ( Table1[Error] ) ), Table1[Counter], DESC ),
Table1[Counter]
)
Measure 2 =
MAXX (
TOPN ( 1, FILTER ( Table1, ISBLANK ( Table1[Error] ) ), Table1[Counter], DESC ),
Table1[CreationDate]
)
You may use TOPN Function.
Measure =
MAXX (
TOPN ( 1, FILTER ( Table1, ISBLANK ( Table1[Error] ) ), Table1[Counter], DESC ),
Table1[Counter]
)
Measure 2 =
MAXX (
TOPN ( 1, FILTER ( Table1, ISBLANK ( Table1[Error] ) ), Table1[Counter], DESC ),
Table1[CreationDate]
)
Hey @v-chuncz-msft
thanks for the help it's perfectly, except the last one.
I didn't express my self clear enough. 🙂
i wanted it to show the last entry in the counter column, regards to date. So we can keep track of the current count of sticks since last error 😄
Just change the third parameter of TOPN Function to Table1[CreationDate].
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.