Forum Discussion
Mutli-Row Card - Show current month when nothing else selected
I have a visual and a multi-row card. When a month is selected in the visual, I have the multi-row card filtering to that month. However if no month is selected is there a way to make the multi-row card default to the current month?
I'm using the following measure to filter it to the selected month:
MeasureToCheck = COUNTROWS(ALLSELECTED('PM Table'[Month PM Due]))
When a month isn't selected, the multi-row card is blank, but I would like it to show the current month.
I have posted a pbix file here: pbix file
Thanks for any information!
Hi, KMcCarthy9
Based on your description, I create a measure as follows.
TestMeasure = IF(CALCULATE(COUNTROWS('PM Table'),ALL('PM Table'))<>CALCULATE(COUNTROWS('PM Table'),ALLSELECTED('PM Table')),1,IF(SELECTEDVALUE('PM Table'[Month PM Due])=FORMAT(TODAY(),"MMMM"),1,0))
Result:
If I misunderstand the your thoughts, please show us your expected output. I am glad to solve the problem for you.
Best Regards,
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
6 Replies
- v-alq-msft
Community Support
Hi, KMcCarthy9
Based on your description, I create a measure as follows.
TestMeasure = IF(CALCULATE(COUNTROWS('PM Table'),ALL('PM Table'))<>CALCULATE(COUNTROWS('PM Table'),ALLSELECTED('PM Table')),1,IF(SELECTEDVALUE('PM Table'[Month PM Due])=FORMAT(TODAY(),"MMMM"),1,0))
Result:
If I misunderstand the your thoughts, please show us your expected output. I am glad to solve the problem for you.
Best Regards,
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- KMcCarthy9
Helper V
Hi v-alq-msft ,
Thank you for this as I was able to get it working. However, I left out that this will be used a on a page with slicers, and when I make a selection in a slicer, the multi-row card again shows all months and does not default to the current month.
Is there a way to have the multi-row card default to the current month even when a selection is made in a slicer? I only want to change the month of the multi-row card when a month is selected in the column graph or a month slicer.
I have uploaded the file with slicers here: pbix file
Thank you for your help!- PaulDBrown
Community Champion
To stop a visual from being affected by slicers, all you need to do is set the visual's interaction to none (click on a slicer, and go to FORMAT in the ribbon, click on the otion edit interaction on the left).
I'm not completely sure what it is you are trying to achieve with the multi-row card. If nothing is selected, it is actually displaying values (whereas you mentioned in your original post that it was displaying blank).
Anyway, I have set up a Calendar Table and measures to allow for the mutli-row card to display values pertaining to the current month if no selection is made on the bar chart - month- or in a slicer (month). (please note that the way you have set up the data in the page is not fitering by year btw). As you will see, the multi- row card only responds to the month slicer or interaction with the bar chart.
Here is the PBIX File: Multi-Row PBIX