Forum Discussion
Create a table with mixed format values
Hi, thanks for your suggestion, but I'm a little lost following your step 2. How can I go to the query editor if the new table was created outside the Query Editor?
Thank in advance!
diegoadum Oh man, my mistake. Sorry about that. Two solutions:
1. use something like KPI _TABLE = SUMMARIZE(TABLE, KPI_NAME, KPI_DATE)
create the relationship for the KPI name and for the date
then bring in calculated columns for each of the KPI's you want. Assuming that there is just one kpi per name per date then you might use:
KPI1 = CALCULATE(AVERAGE(TABLE[KPI_VALUE]),KPI[NAME]="KPI1")
KPI2 = CALCULATE(AVERAGE(TABLE[KPI_VALUE]),KPI[NAME]="KPI2")
KPI3 = CALCULATE(AVERAGE(TABLE[KPI_VALUE]),KPI[NAME]="KPI3")
...
or
2. Take the existing table in the query editor and duplicate it, remove any unessesary columns, then do the unpivoting.
With both solutions you need to format to what ever you want. Remeber the row headers will be the KPI name column from the new table.
// If this is a solution please mark as such