Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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].