cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Naveen_SV
Helper III
Helper III

How to display Blank in card when i have used date column if none of the filters are selected

I have an requriemnt in using the card visual i am displaying the date which as selelected earlist,

but my customer is looking for when there is no filters are selected it shoulddate forpc.PNG disply (blank).

6 REPLIES 6
Pragati11
Super User
Super User

Hi @Naveen_SV ,

 

Just want some additional details on your query. What filter are you using to get this DATE value in card visual.

It will be nice to have a sample data here.

 

If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! 🙂

 

Thanks,

Pragati

Best Regards,

Pragati Jain

MVP logoDACertAzCert

LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

@Pragati11  Thansk for your reply,

 

I am not able to attach the pbi file, but i have attachted snap shot,

consider there is two column country and dates, if i click on the country map then only date should disply in the card, else this should be display as blank.datepcd.PNG

Hi @Naveen_SV ,

 

You can create a measure as follows:

 

new Check 1 = var total = CALCULATE(COUNT(Table[Date]), ALL(Table[Date])) RETURN IF(HASONEVALUE(Table[Date]), SELECTEDVALUE(Table[Date]), BLANK())
 
Move this measure to your card visual.
 
If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! 🙂
 
Thanks,
Pragati

Best Regards,

Pragati Jain

MVP logoDACertAzCert

LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

HI @Pragati11 

this was good for one value how about multi dates are there if i need to show first dates in that.

 

eX :

dATE               Country

22/02/2020     India

24/03/2020     India

Hi @Naveen_SV ,

 

You can modify your DAX as follows and try:

 

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()))

 

Also, try to understand the DAX expression above, so that you can modify it yourself.

 

If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! 🙂

 

Thanks,

Pragati

Best Regards,

Pragati Jain

MVP logoDACertAzCert

LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

@Pragati11  thanks it worked 🙂

Helpful resources

Announcements
Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Power BI Dev Camp Session 22 768x460.jpg

Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!