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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Dan_at_TWE
Helper III
Helper III

Slicer not working with pie chart

Having a problem with a pie chart.   The pie chart is picking up the selected value for all 5 months and summing them instead of just the one month indicated by the slicer. As you can see in the pic, it says the visual is picking up both the year and the month filters from Commissions (All).

Pie chartPie chart

The data is as follows January thru May, left to right.

DataData

I have a line graph for this particular item on another page that displays the monthly values just fine. I don't know why this particular visual is behaving in this way. For now, the [one] slicer is synced to all pages and displayed on all pages.

 

Looking at the data table in Power BI itself, all looks as it should.

Power BI data tablePower BI data table

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Dan_at_TWE 

 

That's because the relationship, the directionof the cross filter.

vzhengdxumsft_0-1719380709389.png

The [Is value] in Income_Statements table can not be affected by the Slicer in Balance_Sheets.

So I write a dax:

MEASURE =
VAR _vtable =
    FILTER (
        SELECTCOLUMNS (
            ALLSELECTED ( Income_Statements ),
            'Income_Statements'[Level 3],
            'Income_Statements'[IS Value],
            'Income_Statements'[Date],
            "_Month1", FORMAT ( 'Income_Statements'[Date], "mmmm" )
        ),
        'Income_Statements'[Level 3] = "Comissions"
            && FIND (
                [_Month1],
                CONCATENATEX (
                    SELECTCOLUMNS (
                        SUMMARIZE (
                            'Balance_Sheets',
                            'Balance_Sheets'[Date],
                            "_Month", FORMAT ( [Date], "mmmm" )
                        ),
                        [_Month]
                    ),
                    [_Month]
                ),
                ,
                BLANK ()
            )
                <> BLANK ()
    )
RETURN
    SUMX ( _vtable, [IS Value] )

 The result is as follow:

vzhengdxumsft_1-1719380910684.png

 

 

Best Regards

Zhengdong Xu
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

5 REPLIES 5
Dan_at_TWE
Helper III
Helper III

I figured out yesterday that I was using a slicer from the wrong table.  If I use the other one from the income statements, it works. Hats off to v-zhengdxu-msft to show me how to integrate the two. Thanks for the code.  In hindsight, the best solution would have been to create a master date table for everything to use, and turn off the auto time option.

Usually if you see an important date in your model, a date table is generally the better way to go.

The sooner you get used to a date table, the more you will see the usefulness.



Proud to be a Super User!

daxformatter.com makes life EASIER!
Anonymous
Not applicable

Hi @Dan_at_TWE 

 

That's because the relationship, the directionof the cross filter.

vzhengdxumsft_0-1719380709389.png

The [Is value] in Income_Statements table can not be affected by the Slicer in Balance_Sheets.

So I write a dax:

MEASURE =
VAR _vtable =
    FILTER (
        SELECTCOLUMNS (
            ALLSELECTED ( Income_Statements ),
            'Income_Statements'[Level 3],
            'Income_Statements'[IS Value],
            'Income_Statements'[Date],
            "_Month1", FORMAT ( 'Income_Statements'[Date], "mmmm" )
        ),
        'Income_Statements'[Level 3] = "Comissions"
            && FIND (
                [_Month1],
                CONCATENATEX (
                    SELECTCOLUMNS (
                        SUMMARIZE (
                            'Balance_Sheets',
                            'Balance_Sheets'[Date],
                            "_Month", FORMAT ( [Date], "mmmm" )
                        ),
                        [_Month]
                    ),
                    [_Month]
                ),
                ,
                BLANK ()
            )
                <> BLANK ()
    )
RETURN
    SUMX ( _vtable, [IS Value] )

 The result is as follow:

vzhengdxumsft_1-1719380910684.png

 

 

Best Regards

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

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

 I'm obviously missing something real basic with how slicers work.  I have the three sample data spreadsheets and the model file. No matter how the slicer is set, it's a sum of all the months. It happens with any account in the value box. 

 

What I want to to be able to select a month, and have a pie chart of the expenses for that month. Of course it would be more than just the one, but they are all doing the same thing.

https://drive.google.com/drive/folders/1OyYKYJQHJNbdkDBj--BW8BpQ-cFEvJ_0?usp=sharing

 

 

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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