I am looking for card value which should show blank value when i have not selected any filters.
if i have multi values in it card how to display max value of that value
below formuale i have tried it's working for date value which has unique.
new Check 1 = var total = CALCULATE(COUNT(Table[Date]), ALL(Table[Date])) RETURN IF(HASONEVALUE(Table[Date]), SELECTEDVALUE(Table[Date]), BLANK())
this formulae is not working when we have multi vaues below is an example both are from same country but i would like to display first value of of Name.
Solved! Go to Solution.
I add some data to your original sample to test.
Please try this measure:
new Check 2 = IF ( CALCULATE ( DISTINCTCOUNT ( 'Table (2)'[Date] ), ALLSELECTED ( 'Table (2)' ) ) = CALCULATE ( DISTINCTCOUNT ( 'Table (2)'[Date] ), ALL ( 'Table (2)' ) ), BLANK (), MAX ( 'Table (2)'[Date] ) )
When selecting multi values in slicer, compare original measure and this new meaure, it shows:
See my attached pbix file.
Thanks for your reply if i want to show the country as well in a card related to that date which is max value of the country
how can we show it.
Hi @Naveen_SV ,
Did you try this DAX as posted in one of your other threads where you asked this as an additional question:?
new Check 1 = var total = CALCULATE(COUNT(Table[Date]), ALL(Table[Country])) RETURN IF(HASONEVALUE(Table[Date]), SELECTEDVALUE(Table[Date]), IF(COUNT(Table[Date]) > 1 && COUNT(Table[Date]) < total, MAX(Table[Date]), BLANK()))
Just a suggestion, try to understand the above DAX so that you can modify it on your own.
If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! 🙂
Hi @Pragati11 ,
Thanks for the reply i tried your previous sceniour that i have already updted in this message, where i was not able to get right data when there is no unique data,
however i tried with your new one even though it's was not working some filtered scenario .
thanks for your reply 🙂
@Naveen_SV it should be pretty straight forward:
Max Date = IF ( ISFILTERED ( YourTable[YourColumnForSlicer] ), MAX ( YourTable[Date] ) )
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.
Put your data visualization and design skills to the test! This exciting challenge is happening now through June10th!
Watch Session 22 Ted's Dev Camp along with past sessions!
Click here to read more about the May 2022 updates!