Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I need to create an object to report the year I have filtered, but not how to do this by the language fit DAX used by Power BI and even if it is possible to do this.
For example, a card-type object displaying the filtered year at that time
Solved! Go to Solution.
Assuming you have a column called "Year" that has the years, add that as a slicer.
Create a measure with the following formula:
CurrentYear = MIN([Year])
Add that measure in a card visualization.
@Anonymous you actually wanted to display the filter Year itself okay
but that will only work with 1 year at a time
only way I think you can do this with text filters is with the function VALUES( )
Current Text Filter = VALUES([Text Column Filter])
AGAIN just as with the year this will only work for 1 filter at a time!
This is what I mean (you've selected more years but card only shows 1)
@Anonymous you are implying you will use a slicer (or another visualization) to filter the Year
if so there's no need to change the measure or inlcude the filter in the measure
When you select a Year in the Slicer - the Card will only show that Year's total - if no Year is Selected - total for all years
Let me know if this helps!
Assuming you have a column called "Year" that has the years, add that as a slicer.
Create a measure with the following formula:
CurrentYear = MIN([Year])
Add that measure in a card visualization.
The Min function serves as the data type is a number but and when a text, varchar for example?
If this is single select only Try These:
Displayed Text With Year = IF ( ISFILTERED(<Year Table - Column>, CONCATENATE("Report Page is Filtered for Year Value of ", (IF(HASONEVALUE(<Year Table - Column>), FIRSTNONBLANK(<Year Table - Column>,"") ,""))), "Report Page is not Filtered by Year")
Alternative simple one without Text Concatenation:
Year Selected = IF(HASONEVALUE(<Year Table - Column>), FIRSTNONBLANK(<Year Table - Column>,"") ,"")
@Anonymous you actually wanted to display the filter Year itself okay
but that will only work with 1 year at a time
only way I think you can do this with text filters is with the function VALUES( )
Current Text Filter = VALUES([Text Column Filter])
AGAIN just as with the year this will only work for 1 filter at a time!
This is what I mean (you've selected more years but card only shows 1)
@Anonymous If you want add this to your Measure (came across to it today)
Current Text Filter = IF ( HASONEVALUE(TableName[Column Name]), VALUES(TableName[Column Name], "Multiple Selections")
Look at the picture
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 |
---|---|
84 | |
76 | |
73 | |
42 | |
36 |
User | Count |
---|---|
109 | |
56 | |
52 | |
48 | |
43 |