Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
This measure makes it so I am able to select more than one month on my report.
When no months are selected, however, it returns this.
Is it possible to make the card display "All Months?"
I would greatly appreciate any advice.
Solved! Go to Solution.
@Anonymous wrote:This measure makes it so I am able to select more than one month on my report.
When no months are selected, however, it returns this.
Is it possible to make the card display "All Months?"
I would greatly appreciate any advice.
Well, first of all, you should not use the automatically generated table of dates in Power BI (you should disable this option). Please do yourself a favour and create a proper date table and connect it to your fact table. If you want to have problems down the line and not know how to deal with them, you can use the automatic table but don't say I have not warned you!
Once you have the date table in the model connected to your fact table, you can do this:
[Months Visible] = var __numberOfVisibleMonths = DISTINCTCOUNT( Dates[MonthShortName] ) var __allMonthsSelected = __numberOfVisibleMonths = 12 var __monthsVisible = CONCATENATEX( SUMMARIZE( Dates, Dates[MonthShortName], Dates[MonthNumberInTheYear] ), Dates[MonthShortName], ", ", Dates[MonthNumberInTheYear] ) return if( __allMonthsSelected, "All Months", __monthsVisible )
Your model does not look to be correctly structured. Please learn a bit about the correct design and the star schema. You'll save yourself grief and scratching your head.
Best
Darek
@Anonymous wrote:This measure makes it so I am able to select more than one month on my report.
When no months are selected, however, it returns this.
Is it possible to make the card display "All Months?"
I would greatly appreciate any advice.
Well, first of all, you should not use the automatically generated table of dates in Power BI (you should disable this option). Please do yourself a favour and create a proper date table and connect it to your fact table. If you want to have problems down the line and not know how to deal with them, you can use the automatic table but don't say I have not warned you!
Once you have the date table in the model connected to your fact table, you can do this:
[Months Visible] = var __numberOfVisibleMonths = DISTINCTCOUNT( Dates[MonthShortName] ) var __allMonthsSelected = __numberOfVisibleMonths = 12 var __monthsVisible = CONCATENATEX( SUMMARIZE( Dates, Dates[MonthShortName], Dates[MonthNumberInTheYear] ), Dates[MonthShortName], ", ", Dates[MonthNumberInTheYear] ) return if( __allMonthsSelected, "All Months", __monthsVisible )
Your model does not look to be correctly structured. Please learn a bit about the correct design and the star schema. You'll save yourself grief and scratching your head.
Best
Darek
Thank you for the advice! I have read a bit about the star schema- I am not sure if it would work with the data I am using. It was pulled from a company ERP system and the data is essentially stacked on top of one another. I performed joins in SQL Server and transferred the file to Power BI as a single table, per my supervisor's request.
Whoever your supervisor is... he's got little idea about proper dimensional design 🙂
You want to know better? Go to www.sqlbi.com and read all you can read in there... Find the right articles on proper design within Power BI. Tell your supervisor as well to do the same since he has no idea what he says to you and what problems you'll have down the line with a single table design.
Best
Darek
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
8 | |
8 | |
8 | |
6 |
User | Count |
---|---|
14 | |
12 | |
11 | |
9 | |
9 |