Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
hello,
i think that is a very commun question, but i don't know how to find it...
i have a lot of column which correspond of different parameters.
For one column (so for one parameter) i did few new measures (as the summation and the difference of the average and the standart deviation of my parameter merge by day). But now i want to apply these new measures for each column automatically (not by hand). So i want my column name to be a variable... by this way, with the segment/filter on the column name the measure and the curve will change too.
I put a schema (i hope it is clear... i don't know how to explain easily) :
Thanks a lot
Solved! Go to Solution.
Hi @Anonymous ,
In Power Query, select your [Date] column in your parameter table, go to Transform tab > Unpivot Columns (dropdown) > Unpivot Other Columns. This will put all of your column names into an [Attribute] column, and each of your parameter values into a [Value] column. You can change the names of these columns to suit your use by overtyping them in the M code seen in the formula bar on the unpivot step.
This is the correct/optimum data structure for use with Power BI.
In your report, write your measure referring to the [Value] column, and use the [Attribute] column in your slicer.
Pete
Proud to be a Datanaut!
Hi @Anonymous ,
In Power Query, select your [Date] column in your parameter table, go to Transform tab > Unpivot Columns (dropdown) > Unpivot Other Columns. This will put all of your column names into an [Attribute] column, and each of your parameter values into a [Value] column. You can change the names of these columns to suit your use by overtyping them in the M code seen in the formula bar on the unpivot step.
This is the correct/optimum data structure for use with Power BI.
In your report, write your measure referring to the [Value] column, and use the [Attribute] column in your slicer.
Pete
Proud to be a Datanaut!
of course !!! rolala my bad... unpivot is really cool when we use an old and badly thought table.
thanks, i accept your solution =D