- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Label for Multiple Dax Measures
Hello PBI Community Good Day!
Looking for a Dynamic Dax Measure I can use with cards for multiple measures.
In the screen shot below I have 8.
In a perfect world I would like to have only 4 that will change with my calculation slicer.
What I'm trying to accomplish:
Currently I have:
4 cards for Trailing Twelve Months (TTM CY, TTM PY (GL) ect...)
and
4 cards for Year to Date ( YTD CY, YTD PY (GL) ect...)
Look for a way to just use 4 cards that will change with my calculation slicer.
Please advise if you need additional information for clarity.
Regards,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could use a disconnected table for that.
1) Make a table with two values Trailing twelve months and Year to date.
2) Make a slicer using this column
3) Build a dynamic measure that will change depending on the slicer selection
Dynamic_Measure_Card1 =
--Grab the value from the slicer
VAR _SelectedValue = SELECTEDVALUE( 'DisconnectedTable'[Slicer], "Year to date")
--Change the calculation based on that value
RETURN
SWITCH(
_SelectedValue,
"Year to date", [YTD_Measure],
"Trailing twelve months", [TTM_Measure]
)
The only problem with this approach is you'll have to create 4 dynamic measures (for the 4 cards)
A more elegant solution would include Calculation Group but this might be too much for what you are trying to accomplish.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could use a disconnected table for that.
1) Make a table with two values Trailing twelve months and Year to date.
2) Make a slicer using this column
3) Build a dynamic measure that will change depending on the slicer selection
Dynamic_Measure_Card1 =
--Grab the value from the slicer
VAR _SelectedValue = SELECTEDVALUE( 'DisconnectedTable'[Slicer], "Year to date")
--Change the calculation based on that value
RETURN
SWITCH(
_SelectedValue,
"Year to date", [YTD_Measure],
"Trailing twelve months", [TTM_Measure]
)
The only problem with this approach is you'll have to create 4 dynamic measures (for the 4 cards)
A more elegant solution would include Calculation Group but this might be too much for what you are trying to accomplish.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
M3trO1d... GM
We appear to be on the same page. Will give your suggestion a try.
Thank you for your quick response!
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@PBI-Curious I am not entirely certain of what you are trying to do exactly but take a look at this dynamic title measure: The Most Amazing, Mind Blowing Dynamic Slicer Titl... - Microsoft Power BI Community
Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!: Power BI Cookbook Third Edition (Color)
DAX is easy, CALCULATE makes DAX hard...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Greg GM - much appreciate your quick response.
Looking for a dynamic dax measure that will update the 4 cards based on what I select per my calculation slicer MTD, QTD, YTD and TTM.
The 4 cards in my screen shot are currently showing my calculation slicer selection TTM.
Does this addition information help to deteemine what I'm trying to accomplish?
Will take a look at your link provided.
Thank you!

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
08-09-2024 03:01 PM | |||
09-25-2024 08:50 AM | |||
07-03-2024 06:01 AM | |||
09-12-2024 02:47 AM | |||
08-07-2024 12:34 AM |
User | Count |
---|---|
23 | |
11 | |
10 | |
9 | |
9 |
User | Count |
---|---|
17 | |
14 | |
13 | |
13 | |
12 |