Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Use Column Headers as Variable in Measure

Hello.

 

I am creating a matrix table to show annualised values. 

My values change based on declared number of years in the Measure. 

 

I have my Years as Column Headers. Is it possible to use the values in the headers as variable year in my measure?

 

Thank you. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thank you @dearwatson

 

I was able to solve this one by using VAR in my measure. 

 

Thank you!!

 

View solution in original post

4 REPLIES 4
dearwatson
Responsive Resident
Responsive Resident

In answer to your question I don't think it is possible to use the columns headers directly as a parameter of a measure.

 

But you may find you can use "what if" parameters to achieve what you are after... 

 

https://docs.microsoft.com/en-us/power-bi/desktop-what-if

 

Say if you created a parameter for the number of years... or something.

 

 

 

"The commonality between science and art is in trying to see profoundly - to develop strategies of seeing and showing." - Edward Tufte
Anonymous
Not applicable

Thank you @dearwatson

 

I was able to solve this one by using VAR in my measure. 

 

Thank you!!

 

I am facing a similar issue, I want to create a matrix based on user selection for columns and rows.

We have a slicer with column header names, if a column name is selected. I want the Values for that column as rows in the matrix.

Is this possible by using any VAR or Parameter?

Could anyone provide an example?

 

Regards

Thanks

 

sjaiswal11,

 

Did you ever figure this out? Everytwhere I look, suggests unpivoting....

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.