Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Hide card in conditional situation

Hi I am creating a dashboard and I have a calendar view and three cards (A. total stops; B: Total Routes; C: Stops per route, which is dividing total stops by total routes)

 

I am feeding the calendar visual with data of total stops. So when I click on each date, it cross filters the card and shows stops, routes, and stops per route for that speciic date.

 

Everything is fine for now. When I unclick the date, which shows the overview of that month (let's say October), cards for total stops and total routs are correct since it shows the total of that month. However, stops per route will not since it sums up all stops per route that month. But I want to show (total stops of that month)/ (total routes that month)

 

Is there a way I can do that? By using bookmark or using measure....?

I also have a card showing the date that I selected and I want it to show October when I unclick the dates in calendar.

 

Thank you!

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Anonymous ,

     

    You could simply use IF() and ISFILTER() function to create measure to display different values in different situations.

    For example:

    measure = IF(ISFILTERED('calendar'[date]),selectedvalue('calendar'[date]),max('calendar'[date].month))

     

    Best Regards,

    Jay

3 Replies

  • Kumail's avatar
    Kumail
    Icon for Impactful Individual rankImpactful Individual

    Hello Anonymous 

     

    If you could send sample .pbix that demonstrate what you are looking to get. It would really help providing you a quick solution.
     
    You can send the sample .pbix file by adding it to your drive or dropbox and add the link here. 
     
    Regards
    Kumail Raza

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    You could simply use IF() and ISFILTER() function to create measure to display different values in different situations.

    For example:

    measure = IF(ISFILTERED('calendar'[date]),selectedvalue('calendar'[date]),max('calendar'[date].month))

     

    Best Regards,

    Jay