Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi all,
I was reading through the internet, but couldn't find a solution for my problem. Therefore I was hoping someone could point me to the right direction.
I have a basic report with 2 slicers. One slicer that shows all the months and one slicer to select a specific project.
When I have all months selected, the visual is showing me the YTD overview.
When I select one month, the visual shows me the actuals of that specific month.
I would however would like to see in my visual still all the months YTD (in this case YTD June) instead of only June. I was thinking of a measure that ignores the slicer filter, but that somehow doesn't work.
Thanks in advance,
Regards
Solved! Go to Solution.
Hi, @YBZ ;
The logic I use here is to use Flag Measure to make slicer and Visual interact. If you have other visual, you can also use the same method to apply Flag Measure to other visual. I provided two flag measures about YTD in August and August respectively.
1. Only show August visual 's flag meaasure and applied into visual filter.
flag 2 = IF(YEAR(MAX([date]))=YEAR(MAX('Date'[Date]))&&MONTH(MAX([date]))=MONTH(MAX('Date'[Date])),1,0)
2. Display YTD (Measure from 1- 8 month) and apply it into filter
flag = IF(YEAR(MAX([date]))=YEAR(MAX('Date'[Date]))&&MONTH(MAX([date]))<=MONTH(MAX('Date'[Date])),1,0)
In summary, if any visual needs to interact with the slicer, add flag into Visual Filter to the corresponding visual.
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @YBZ ;
The logic I use here is to use Flag Measure to make slicer and Visual interact. If you have other visual, you can also use the same method to apply Flag Measure to other visual. I provided two flag measures about YTD in August and August respectively.
1. Only show August visual 's flag meaasure and applied into visual filter.
flag 2 = IF(YEAR(MAX([date]))=YEAR(MAX('Date'[Date]))&&MONTH(MAX([date]))=MONTH(MAX('Date'[Date])),1,0)
2. Display YTD (Measure from 1- 8 month) and apply it into filter
flag = IF(YEAR(MAX([date]))=YEAR(MAX('Date'[Date]))&&MONTH(MAX([date]))<=MONTH(MAX('Date'[Date])),1,0)
In summary, if any visual needs to interact with the slicer, add flag into Visual Filter to the corresponding visual.
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @YBZ ;
You could create a another date table as a slicer ,then create a flag measure.
1.create a date table as a slicer.
Date = SUMMARIZE('Table',[date])
2.create a measure.
flag = IF(YEAR(MAX([date]))=YEAR(MAX('Date'[Date]))&&MONTH(MAX([date]))<=MONTH(MAX('Date'[Date])),1,0)
3.apply the flag measure into visual filter.
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks all.
@v-yalanwu-msft I tried your way as I more or less understand the logic.
In fact it works in my report, but I have now an issue that my other visuals do not interact with the new date slicer (it shows me all the time values of August/YTD August when I select random month). I am quite new in Power BI, so I need to digest it a little. But anything I could do to make the other visuals as well connected to the slicer? If too complex, I think I will for the moment just delete the visual 🙂
I would probably use a separate slicer for that specific visual (or move it to a new page by itself).
You could layout the report in a way that made it obvious to the consumers.
Then, for the visual you want to show as YTD, use an actual date field for the slicer and set the slicer to 'relative date'.
You need to make sure you edit the interactions to ensure the slicers only filter the visuals you want them to.
Just another way to approach it I guess.
Hope it helps.
Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
If you found this post helpful, please give Kudos. It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen. If you find my signature vaguely amusing, please give Kudos. | Proud to be a Super User! |
@SqlJason has a write up on how to get a similar functionality built into your report, here is a link to their article: https://sqljason.com/2018/03/display-last-n-months-selected-month-using-single-date-dimension-in-pow...
YBZ,
Not sure what you mean with YTD. The top image is in my opinion not showing YTD (Year To Date) values.
Just showing month totals? When looking at the value for June in both images, I see (approximate) the same value...
So If you could explain a bit more what You want, maybe we could find a solution?
Regards,
Thanks for helping out 😊
What I would like to achieve is that when I select a month in my slicer, I want to see a historical trend in my visual and not only details of 1 month.
For example, when I would select June, I would like to see historic trend (January-June) OR highlighting somehow the June month.
While when now selecting only June in my slicer, it filters out June which is not intuitive.
Hope that makes sense. If needed I can share more data 😊
When chaning the slicer to a grid, you could achieve this? Making a selection in the grid would mean that you highlight the month in the chart.
I would guess that it is possible to do this with a DAX Calculation, but this would be more complex.
could you explain what you mean with changing the slicer to a grid?
trying to figure this out for 1 day, but couldn't come to a solution yet. Anyone who could support or point me to right direction?
Much appreciated,
Regards
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
147 | |
85 | |
66 | |
52 | |
46 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |