Forum Discussion

kulpowerbi's avatar
kulpowerbi
Icon for Helper I rankHelper I
5 years ago
Solved

Sorting Pivoted Calendar table Attribute and Values

I have a calendar tablet That I have transfermed and created another Pivoted table with attribute and values, so I can Apply filters like Annual, Quarterly, Monthly and daily with slicer.   Note: I...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi  kulpowerbi ,

    Here are the steps you can follow:

    For sorting, the default is to sort by the first letter order.

    Can you accept the following format:

    1. Create calculated column.

    Column =
    SWITCH(
        TRUE(),
        'Calendar Pivot'[Attribute]="Annual",'Calendar Pivot'[Value],
        'Calendar Pivot'[Attribute]="Quarterly",'Calendar Pivot'[Value],
        'Calendar Pivot'[Attribute]="Daily",FORMAT('Calendar Pivot'[Date],"mm/dd"),
        'Calendar Pivot'[Attribute]="Monthly",FORMAT('Calendar Pivot'[Date],"yy/mm")
        )

    2. Result:

    When selecting "Daily". The result is:

    When "Monthly" is selected, the result is:

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly