Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

QUARTER problem

Dear community members, Although from the first look issue seemed to be easy, I as a beginner still can not solve it. I made calculated column Quarter = QUARTER([Date]), which perfectly returns qua...
  • Fowmy's avatar
    4 years ago

    Anonymous 

    When inserting the quarter column, it sums it. Instead, you can create your measure as follows:

    Measure = 
    
    SWITCH(
        MAX( Table1[Quarter] ),
        1, [Measure A ],
        2, [Measure B ],
        3, [Measure C ],
        4, [Measure D ]
    )


    Or, without the help of the Quarter column

    Measure = 
    
    SWITCH(
         QUARTER( MAX (Table1[Date] )),
        1, [Measure A ],
        2, [Measure B ],
        3, [Measure C ],
        4, [Measure D ]
    )