Forum Discussion
krishb1414
3 years agoHelper III
Return Dynamic Quarters Q1,Q2 Value
Hi All, I have 4 columns Q1,Q2,Q3,Q4. So based on current quarter it should return respective Q value. For example, Currently we are in Febraury, so it should return Q1 value, If we are in May ...
johnyip
3 years agoSolution Sage
krishb1414 , not quite sure if I understand your question correctly, but please try below:
Create a calculated column using this DAX:
Dymanic column = SWITCH(QUARTER(TODAY()),1,[Q1],2,[Q2],3,[Q3],4,[Q4])
and this will be the result:
The data I used is like this, [Dymnamic column] is created as per above.
- krishb14143 years agoHelper III
So, How do you calculated [Q1],[Q2],[Q3],[Q4] measures. are they Aggregated ?
- johnyip3 years agoSolution Sage
Q1,Q2,Q3,Q4 are raw data, not measures/ calcualted columns.
- krishb14143 years agoHelper III
But how can we pass those columns directly to a measure, we can do that by aggregation functions.
How did do you that ?