Forum Discussion
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 it should return Q2 value and so on dynamically.
Note : I don't have Date column in this table
Please help me on this.
See the columns below
5 Replies
- johnyipSolution 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.
- krishb1414Helper III
So, How do you calculated [Q1],[Q2],[Q3],[Q4] measures. are they Aggregated ?
- johnyipSolution Sage
Q1,Q2,Q3,Q4 are raw data, not measures/ calcualted columns.
- johnyipSolution Sage
The entity created is calculated column instead of mesaure.
The calculated column returns the values of some existing column of the raw data, depending on current quarter. No aggregration is present. The reason you see aggregration in the pictureis PowerBI by default use SUM aggregration in table. Nonetheless, you can see the sum of the data itself is equivalent to Q2,