Forum Discussion
Developing a Radar Chart
I'm trying to make a Radar Chart using the average of several attributes in comparison to the average satisfactory level for each attribute.
I also want the data to have a splicer by year and department so what I'm thinking is to have a source table and make a new table using data from the source table.
Currently the source table looks like this:
And I want to make a new table in PowerBi that'll look like this:
I can then use this to make the spider chart but I still haven't figured out how to aggregate data from the source table to create the new table.
I'm sort of new using PowerBi so please help :(
- 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
3 Replies
- Phil_SeamarkMicrosoft Employee
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 ) )- PmagsFrequent 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?
- AnonymousNot applicable
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