The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
See the attached PBIX file for details. This is from our development enviornment so it is not true data.
I want to create a report with a Slicer and Nine Pie Charts. The slicer lets the User Select a Client and a Program. The nine pie Charts all have ResponseFacts.FactValue for the value and ResponseDIM.ItemLabel for the Legend. Each Pe Chart has a Visual Filter of ResponseDIM.GroupSequence. For the first pie chart, ResponseDIM.GroupSequence is 0, for the second it is 1, for the third, it is 2, and so on. For this example, I only did three of them. So far, everything wors as exepcted.
I put the ResponseDIM.GroupLabel as the value for the title. But, it shows the first value for that, not the one based on the Client, Program, and ResponseDIM.GroupSequence value. I have searched for this and found many examples of Dynamic Titles but none that refer to a Slicer and a visual filter. I have tried writing a DAX expression that takes all the selected values into account but none of them worked. I feel that there is a combination that I am just not finding.
I thought the help said to include a .PBIX file. But I got here and do not see how to do so, There does not appear to be an insert file option in the menu.
Here is the model:
Here is the report:
Here are the slicer settings:
Here are the settings for the second Pie Chart:
Here is the Title setting for the Pie Chart visuals:
PLease let me know if you need anything else.
Here is some sample data:
Clients | |
ID | Name |
1 | A |
2 | B |
3 | C |
Programs | ||
ID | ClientID | Name |
1 | 1 | Client A Program 1 |
2 | 1 | Client A Program 2 |
3 | 2 | Client B Program 3 |
4 | 2 | Client B Program 4 |
5 | 3 | Client C Program 5 |
6 | 3 | Client C Program 6 |
Responses | ||||
ID | GroupName | GroupSequence | LabelName | LabelSequence |
1 | G1 | 1 | G1L1 | 1 |
2 | G1 | 1 | G1L2 | 2 |
3 | G1 | 1 | G1L3 | 3 |
4 | G2 | 2 | G2L1 | 1 |
5 | G2 | 2 | G2L2 | 2 |
6 | G2 | 2 | G2L3 | 3 |
7 | G3 | 3 | G3L1 | 1 |
8 | G3 | 3 | G3L2 | 2 |
9 | G3 | 3 | G3L3 | 3 |
ResponseFacts | |||
ID | PID | RID | FV |
1 | 2 | 7 | 1 |
2 | 2 | 7 | 1 |
3 | 2 | 8 | 1 |
4 | 2 | 4 | 1 |
5 | 2 | 4 | 1 |
6 | 3 | 7 | 1 |
7 | 3 | 8 | 1 |
8 | 3 | 8 | 1 |
9 | 3 | 7 | 1 |
The first three are dimension tables and the last one is the fact table. For this purpose I excluded missions since Ido not think it plays a role here but I can make up that data if it would help.
The first two dmension, Client and Program are in one slicer so a user can select a client and then one or more programs for that client. Lets create two Pie Charts. The value is FV from the Fact table. The Legend is LabelName from the Responses dimension. On the visual filters for the first pie chart, I set Group Sequence to be 1. On the second Pie Chart, I do the same thing but set group sequence to be 2. I have tried many ways to set the Pie Chart Title to be GroupName. But they always result in G1 being selected. No matter what I do, it will not show G2 or G3 for the Pie Chart Title.
I get that this explanation is hard to follow. I will look into putting a link to a PBX file.
Hi @MichaelWacey,
So you mean you create a calculate column to show the field value based on filter selections?
If that's the case, current power bi does not support to create dynamic calculated column/table based on filter effects. They are works on different level and you can't use child to affect their parent.
Notice: the data level of power bi(from parent to child level)
Database(external) -> query table(query, custom function, query parameters) -> data model table(table, calculate column/table) -> data view with virtual tables(measure, visual, filter, slicer)
Regards,
Xiaoxin Sheng
Hi @MichaelWacey ,
Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
I apologize, but at least for me, the question is unclear.
I recommend attaching an image with the desired result.
Regarding attaching a file, you can save it to Drive or any other shared folder and share it using the link.