March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Is it possible to pass a parameter to specify a column name?
So I have the calculation below:
Solved! Go to Solution.
Hi @elmer1970 ,
To work around this issue, you can select the these columns such as Col1,Col2,and Col3 in Query Editor, right click and choose Unpivot columns. Then Put the Attribute(content is names of Col1,Col2,and Col3) into Slicer visual.
For example the steps in the picture below.
Then you can create measure like DAX below, assuming the [the fixed field] is referred to the fields which is exclude columns such as Col1,Col2,and Col3(in the picture above, it is field [Product]).
Measure1 = CALCULATE( MAX( 'AllBoundaries'[Value]), FILTER('AllBoundaries', 'AllBoundaries'[the fixed field]= MAX('AllBoundaries'[the fixed field])&&'AllBoundaries'[Attribute]=MAX( 'AllBoundaries'[Attribute])&& 'AllBoundaries'[Value] <= [Test Score] ))
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @elmer1970 ,
The [Test Score] is a column , right? If yes, you can add MAX function in front of it, like MAX(Table[Test Score]).
Best Regards,
Amy
Hi @elmer1970 ,
To work around this issue, you can select the these columns such as Col1,Col2,and Col3 in Query Editor, right click and choose Unpivot columns. Then Put the Attribute(content is names of Col1,Col2,and Col3) into Slicer visual.
For example the steps in the picture below.
Then you can create measure like DAX below, assuming the [the fixed field] is referred to the fields which is exclude columns such as Col1,Col2,and Col3(in the picture above, it is field [Product]).
Measure1 = CALCULATE( MAX( 'AllBoundaries'[Value]), FILTER('AllBoundaries', 'AllBoundaries'[the fixed field]= MAX('AllBoundaries'[the fixed field])&&'AllBoundaries'[Attribute]=MAX( 'AllBoundaries'[Attribute])&& 'AllBoundaries'[Value] <= [Test Score] ))
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Amy
thank you so much for your reply, when I add the measure I get the error :
Column 'Test Score' cannot be found or may not be used in this expression. Would you have any idea how I could fix this?
Hi @elmer1970 ,
Does that make sense? If so, kindly mark my answer as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.
Best regards
Amy
Hi @elmer1970 ,
The [Test Score] is a column , right? If yes, you can add MAX function in front of it, like MAX(Table[Test Score]).
Best Regards,
Amy
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
User | Count |
---|---|
93 | |
90 | |
86 | |
76 | |
49 |
User | Count |
---|---|
166 | |
149 | |
99 | |
73 | |
57 |