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
Entinval
Frequent Visitor

Display a chart showing monthly revenues up until the month selected by user in slicer

Hello all !

 

I've been stuck on a issue for a while now, here's what's happening:

I'm trying to build a graph that looks something like this:

Entinval_0-1672823268253.png

Looks simple enough right? Issue is that I want the user to be able to put a filter on the month (the value used for the x-axis of the graph), and this would have for effect that all the revenues after that given month would no longer be displayed on the graph.

 

For instance, if the user chooses to put a filter on '202207', the resulting graph would be this:

Entinval_1-1672823417594.png

 

I've tried many things in my DAX formula for this measure (ALL, ALLEXCEPT, ALLSELECTED, REMOVEFILTERS, etc.), but it appears I'm never able to store the value selected by the user in the slicer, then use it in my formula.

 

Any idea would be greatly appreciated, many thanks in advance!

 

4 REPLIES 4
Entinval
Frequent Visitor

Hi @Anonymous ,

 

Thanks for the reply! The reason I cannot use a between slicer is because I also have Card visuals on the same sheet of the report, and I want it to display the revenue only for the month selected by the user in the slicer on these Cards.

Hi @Entinval ,

 

Do you want the slicer not to affect the results of the card? You can try editing the interaction.

Here's a simple example.

Sample data.

vstephenmsft_0-1672902065901.png

The card is the sum of all values, and the bar chart is the value of the month.

vstephenmsft_1-1672902093619.png

If you want this "After" slicer to not affect the results of the card, select the slicer visual, click "Format", and then click "Edit Interaction"

1.png

Then in the card visual, select "None" so that the slicer does not interact with the card.

vstephenmsft_2-1672902294274.png

Reference:Change how visuals interact in a report - Power BI | Microsoft Learn

You can download my attachment for more details.

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Stephen,

 

Thank you for your reply, but this is unfortunately not what I want to do.

My goal is for the user to be able to choose a single month & year in two slicers, and see these two things:

1. A card showing the sales for the month and the year selected in the slicers

2. A chart showing the revenue evolution for each month of that year up until the month selected in the slicer (chart should stop at that month).

 

Problem is that if I remove interactions between the slicer and one of these two visuals, I will not see the desired outcome. The difficulty is particularly for the chart, where I want to create a measure that stores the value selected in the slicer, then computes the revenue for each month (so ignoring the filter on the month) up until the month becomes larger than the stored month slicer value. 

 

Any idea how to do this?

Thank you !!

Anonymous
Not applicable

Hi @Entinval,

is there a particular reason why you do not want to use a "between" or "after" style slicer?

Screenshot_20230104_102354.png

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.