Hi ,
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.
ex:
Name Country
Jack Brazil
Mack brazil
another ex:
Date Country
22/02/2020 India
24/10/2020 Brazil
ex:
Solved! Go to Solution.
Hi,
Please try this:
related country =
CALCULATE (
MAX ( 'Table (2)'[Country] ),
FILTER ( ALL ( 'Table (2)' ), 'Table (2)'[Date] = MAX ( 'Table (2)'[Date] ) )
)
The result shows:
See my attached pbix file.
Best Regards,
Giotto
Hi,
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.
Best Regards,
Giotto
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,
Please try this:
related country =
CALCULATE (
MAX ( 'Table (2)'[Country] ),
FILTER ( ALL ( 'Table (2)' ), 'Table (2)'[Date] = MAX ( 'Table (2)'[Date] ) )
)
The result shows:
See my attached pbix file.
Best Regards,
Giotto
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! 🙂
Thanks,
Pragati
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!
Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!
User | Count |
---|---|
398 | |
105 | |
68 | |
55 | |
49 |
User | Count |
---|---|
378 | |
118 | |
82 | |
67 | |
54 |