Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
YBZ
Helper III
Helper III

ignore slicer in visual

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. 

YBZ_0-1633335827009.png

 

When I select one month, the visual shows me the actuals of that specific month. 

 

YBZ_2-1633336173203.png

 

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

 

 

 

 

 

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

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)

vyalanwumsft_0-1633569732049.png

 

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)

vyalanwumsft_1-1633569780614.png

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.

View solution in original post

10 REPLIES 10
v-yalanwu-msft
Community Support
Community Support

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)

vyalanwumsft_0-1633569732049.png

 

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)

vyalanwumsft_1-1633569780614.png

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.

v-yalanwu-msft
Community Support
Community Support

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.

vyalanwumsft_0-1633485277010.png

The final output is shown below:

vyalanwumsft_1-1633485308085.pngvyalanwumsft_2-1633485361838.png

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 🙂

 

YBZ_0-1633545688752.pngYBZ_1-1633545726076.png

 

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'.

 

KNP_1-1633547626038.png

 

You need to make sure you edit the interactions to ensure the slicers only filter the visuals you want them to.

KNP_2-1633547776271.png

 

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 ;).
chrome-9xf-Zagzel-B

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.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x
sirlanceohlott
Advocate III
Advocate III

@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...

verbani007
Frequent Visitor

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.  

YBZ_0-1633429013606.png

 

YBZ_1-1633429013611.png

 

While when now selecting only June in my slicer, it filters out June which is not intuitive.

YBZ_2-1633429013616.png

 

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? 

YBZ
Helper III
Helper III

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

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.