Forum Discussion
Developing a Radar Chart
- Anonymous9 years ago
Hi Pmags,
Do you want to create slicers using department and year fields and then use the slicers to filter the New table? If that is the case, as there is no relationship between new table and source table, the slicers will not work.
You can perform the following steps to achieve your requirement.
1. Duplicate a query of your source table and rename the query to NewTable in Query Editor of Power BI Desktop.
2. Select the three columns (Efficacy, Resillience, Sustainability), then click “Unpivot columns” in the following screenshot.
3. Rename the “Attribute” column to Criteria.
4. Add a custom column named “Average Of satisfactory” and set the value of it to 3.
5. Create a table using fields in NewTable, and make sure that select “Average” for value field.
6. Create slicer using department and year fields in source table and using them to filter the table visual. Power bi Desktop create relationship between NewTable and source table using Project field, thus it is ok to filter the table visual using the department and year slicers.
Thanks,
Lydia Zhang
Here is one approach in DAX.
Not sure where your Satisfactory aggregation comes from your sample data, so I hard coded it to 3. But if you share more we can probably fix that for you.
New Table = UNION (
--- Efficacy ----
SUMMARIZECOLUMNS(
"Criteria" , "Efficacy",
"Average Value" , AVERAGE(SourceTable[Efficacy]),
"Average Of satisfactory" , 3 )
,
--- Resilience ----
SUMMARIZECOLUMNS(
"Criteria" , "Resilience",
"Average Value" , AVERAGE(SourceTable[Resillience]),
"Average Of satisfactory" , 3 ) ,
--- Sustainability ----
SUMMARIZECOLUMNS(
"Criteria" , "Sustainability",
"Average Value" , AVERAGE(SourceTable[Sustainability]),
"Average Of satisfactory" , 3 )
)- Pmags9 years agoFrequent VisitorThe satisfactory aggregation is just a mandatory amount for each attribute. It isn't computed. I was able to make the exact same table which I referenced in the original post (thanks to your code!) to develop the radar chart but an issue came up. Since I want to make a splicer by DEPARTMENT and by YEAR I made a splicer using the data from the Source Table since the department and year was listed there hoping that the aggregation would automatically adjust given that the New Table used data from the Source Table but it isn't working. Any ideas?