Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Dynamically show/hide cards based on column values

Hi All,

I have a requirement as below:

I have two cards ,1. Balance Available 2. Ending Balance which are two measures. Both these cards should dynamically hide and show the measures based on "Category" field shown below. (that is when BSF category is selected the card should show Ending balance measure and when "UI" is selected , it should show Balance Available measure
Note: There are no slicers for Category. Based on  the user access/other slicers available in the report, the category column gets filtered in the report.

 

POS3002_1-1619189623762.png

Can someone let me know how this can be achieved?

Thanks

Poojitha

 

2 ACCEPTED SOLUTIONS

Please see if this would help :

 

AbhiSSRS_0-1619540345711.pngAbhiSSRS_1-1619540375801.png

 

AbhiSSRS_2-1619540397881.pngAbhiSSRS_3-1619540407109.png

The card is mapped to a measure :

Measure = IF(LOOKUPVALUE(Sheet2[Column2],Sheet2[Column1],SELECTEDVALUE(Sheet1[Category]))="Ending Balance",
SUMX(Sheet1,Sheet1[EndingBalance]),
SUMX(Sheet1,Sheet1[BalanceAvailable]))
 
The card visual's title is mapped to Category as well.

View solution in original post

Probably you are missing a relationship between the tables in model.

View solution in original post

20 REPLIES 20
AbhiSSRS
Solution Sage
Solution Sage

Hello!

isn't this feasible with a measure on selected value for Category for you? The Label will default to the selected Value with no need to hide/unhide

 

AbhiSSRS_1-1619255680698.png

 

 

Am I missing something here?

Anonymous
Not applicable

Hi @AbhiSSRS 
Please note that there is not slicer for the "Category" field, this field is getting filtered based on the other slicers available.
Is there a way to achieve this? As there are two measures to be shown dynamically.

It would still work! the selected value for the control which shows 'Category' will automatically show up  the corresponding value on the card visual. Like when BSF is selected(based on other selections as you mentioned) it would display Ending Balance in the Card.

Anonymous
Not applicable

@AbhiSSRS 
Tried to replicate the same but could not achieve, below is the sample data.

POS3002_1-1619527900357.png

 


POS3002_0-1619527825672.png

 


Is possible, can you suggest the solution with the data given here?

Please see if this would help :

 

AbhiSSRS_0-1619540345711.pngAbhiSSRS_1-1619540375801.png

 

AbhiSSRS_2-1619540397881.pngAbhiSSRS_3-1619540407109.png

The card is mapped to a measure :

Measure = IF(LOOKUPVALUE(Sheet2[Column2],Sheet2[Column1],SELECTEDVALUE(Sheet1[Category]))="Ending Balance",
SUMX(Sheet1,Sheet1[EndingBalance]),
SUMX(Sheet1,Sheet1[BalanceAvailable]))
 
The card visual's title is mapped to Category as well.
Anonymous
Not applicable

@AbhiSSRS 
Can you please confirm if you are using single card? If yes, pls do let me know how the titles are being changed dynamically

Yes this is a single card mapped to the measure. The measure changes its value dynamically so it appears as per requirement. This may be an alternative to your actual requirement of having 2 and hiding/unhiding because that is not feasible without button clicks (bookmarks need button clicks)

AbhiSSRS_0-1619603611050.png

Map the Title text to field , it will change dynamically based on selection

 

Anonymous
Not applicable

@AbhiSSRS  Tried to do the same but the text is showing as balance available always though i selected a category which has ending balance( but the numbers are changing correctly.)

POS3002_0-1619605075509.png

 

Probably you are missing a relationship between the tables in model.

Anonymous
Not applicable

@AbhiSSRS  Thank you for the detailed steps and timely responses. this helped.

Anonymous
Not applicable

@AbhiSSRS  I will try this out and let you know asap.

aj1973
Community Champion
Community Champion

Hi @Anonymous 

You can achieve that by using 

aj1973_1-1619201261582.png

aj1973_2-1619201294276.png

 

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Anonymous
Not applicable

Hi @aj1973 

 

could you please help provide more details as to we can achieve this using bookmarks.

aj1973
Community Champion
Community Champion

Hi @Anonymous 

Maybe this video can help you better

https://www.youtube.com/watch?v=xCMqWEvSkAs

 

Or maybe A sample Pibx would help me show you through your model

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Anonymous
Not applicable

Hi @aj1973 
Thanks for the video. I have understood the concept of bookmarks, but trying to understand how the bookmarks can be used the achieve my scenario where i need to show either the Ending Balance or Balance Available based on the values that are available in the category field.

Probably , could you share a pbix file if possible and that will help.

thank you.

aj1973
Community Champion
Community Champion

Hi @Anonymous 

Here is a report where i used bookmarks and drillthroughs to navigate between pages and visuals

(Sorry can't share the Pbix though)

https://app.powerbi.com/view?r=eyJrIjoiMmFhYWVlMDUtYTk3My00Y2U2LTgwMWEtZDQwNjAyNmQwNjc5IiwidCI6IjgzNTU5ODFiLTJlYTYtNDdjZi04ZjJiLTc3MTY3N2FmZjMyZCJ9&pageName=ReportSectione052fcce1f285e771356

 

Maybe if you can share a sample of your Pbix then i can I help you with it.

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Anonymous
Not applicable

@aj1973 
Tried to attach the pbix file but it doesnt allow,
https://app.powerbi.com/view?r=eyJrIjoiMGVhZDgwN2MtMmU2NC00ZTY1LTg3MDktNzQ5Nzg5ZjZjOTU4IiwidCI6ImY3M...


POS3002_2-1619527967185.png

Can you help with the solution based on the screenshots?

aj1973
Community Champion
Community Champion

Hi @Anonymous 

You need to upload it to a cloud storage to share publicly your Pibx file like Google Drive, One drive....

Please do!

Are these descriptions of the category fixed or variables?

aj1973_4-1619529124234.png

 

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Anonymous
Not applicable

@aj1973 
I am trying to have the file upload onto the drive , will share it across.
From the above image you sent, those are the measures which needs to be shown for a given "Category" value.
Eg: BSF should show the "Ending balance" measure in the card and hide the "Balance available" card.
"Ending balance" and "Balance available" are measures

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors