The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have a page with a visual with separate slicers for month, quarter and year.
I am trying to make a title on a card so that title that says "Quarter 2 2023" Or "April 2023".
I tried to use the following measure:
Title1 = "Report Name "&Unichar(10)&selected[selected quarter]&selected[selected month]&" "&selected[selected year]
If I choose April but no quarter it says "Qtr 2April 2023" It is OK if I just choose quarter, not month.
Is there a way I can either change my title measure to ignore the quarter if the month is chosen or better yet have a single slicer to choose either the month or quarter?
Solved! Go to Solution.
Maybe you can consider something like:
Title1 =
var selectedQuarterOrMonth = SELECTEDVALUE(Table[Month], SELECTEDVALUE([Quarter]))
"Report Name " &Unichar(10)& selectedQuarterOrMonth & " " & selected[selected year]
The idea behind this is that selectedvalue will only return a value if there's only 1 value. Since each quarter has more than a month, then the selectedvalue will return the quarter value as an alternative result if a quarter is selected, rather than a single month.
I had to use return to make it work, but it worked.
Maybe you can consider something like:
Title1 =
var selectedQuarterOrMonth = SELECTEDVALUE(Table[Month], SELECTEDVALUE([Quarter]))
"Report Name " &Unichar(10)& selectedQuarterOrMonth & " " & selected[selected year]
The idea behind this is that selectedvalue will only return a value if there's only 1 value. Since each quarter has more than a month, then the selectedvalue will return the quarter value as an alternative result if a quarter is selected, rather than a single month.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
105 | |
77 | |
74 | |
44 | |
36 |
User | Count |
---|---|
152 | |
110 | |
64 | |
64 | |
57 |