Forum Discussion
Use Measure in x-axis
Yes you can have a calculated column with a "measure" in it. Just verify how your context works, as when you convert a measure - that is supposed to work in a filter context - to a column - which has a row context - your measure will calculate in a different way.
- LauraBueno6 years agoHelper III
Hi Anonymous ,
Thank you for your message. Would it work if I create a new table that has the correct columns so that when I put the expression within a column the evaluation per row is correct? If so how could I directly use the measure within the column (new _column = [Calculated_measure]? or do I need to put all the calculations within the column again?
Thanks
Laura
- Anonymous6 years agoNot applicable
A measure if inserted in a Calculated Column will calculate the same value, but a measure is typically dynamic and recalculate based on the filter context. In a column there is no concept of a dynamic filter context.
Example: imagine that you have a measure that calculate the sales amount over a period, and you have a date selector. Whenever you change the period, obviously that sales amount changes as it's calculated with the filter context determined by your date slicer. If you put that measure in a column, it will be calculated for each row of that table you've put it into and with the view of the data that that row has in that moment. So if you put it in the Sales table (where one row is one sold item) and the formula is Amount=SUMX(sales;sales[amount]) the measure will be always the overall total as rows are not filtered by the context.
And yes, one way to work around this is to have a "precalculated measure" table, with a summarized view of your data.
However without knowledge of your data model is hard to recommend one or another method. - V-lianl-msft6 years agoCommunity Support
Hi LauraBueno ,
Unfortunately you can't use measures as an axis at the moment, just calculated columns are supported for the use on axis.
If the problem persists,could you please share sample data and DAX formula?(Please mask any sensitive data before uploading)
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.