Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
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 chart
The data is as follows January thru May, left to right.
Data
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 table
Solved! Go to Solution.
Hi @Dan_at_TWE
That's because the relationship, the directionof the cross filter.
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:
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.
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.
Hi @Dan_at_TWE
That's because the relationship, the directionof the cross filter.
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:
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.
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
User | Count |
---|---|
18 | |
16 | |
15 | |
13 | |
12 |
User | Count |
---|---|
10 | |
8 | |
8 | |
7 | |
6 |