Forum Discussion

TrentS's avatar
TrentS
Helper IV
4 years ago
Solved

Fiscal Quarter usage/Data Structure help

Greetings all, I need some theory/ structure help. I have a data set in which a text based column for a custom fiscal quarter is given (and the sponsors wish to have it remain in this format) is ...
  • Icey's avatar
    Icey
    4 years ago

    Hi TrentS ,

     

    I didn't use the quarter rank. Please check if my method meet your requirement:

    Measure =
    VAR CurrentProduct_ =
        MAX ( 'Data Table'[Product] )
    VAR CurrentRetailer_ =
        MAX ( 'Data Table'[Retailer] )
    VAR CurrentCountry_ =
        MAX ( 'Data Table'[Country] )
    VAR CurrentQuar_ =
        MAX ( 'Data Table'[Quarter] )
    VAR PreviousQuar_ =
        CALCULATE (
            MAX ( 'Data Table'[Quarter] ),
            FILTER (
                ALL ( 'Data Table' ),
                'Data Table'[Product] = CurrentProduct_
                    && 'Data Table'[Retailer] = CurrentRetailer_
                    && 'Data Table'[Country] = CurrentCountry_
                    && 'Data Table'[Quarter] < CurrentQuar_
            )
        )
    RETURN
        CALCULATE (
            SUM ( 'Data Table'[Price] ),
            FILTER (
                ALL ( 'Data Table' ),
                'Data Table'[Product] = CurrentProduct_
                    && 'Data Table'[Retailer] = CurrentRetailer_
                    && 'Data Table'[Country] = CurrentCountry_
                    && 'Data Table'[Quarter] = PreviousQuar_
            )
        )
    

     

     

    Best Regards,

    Icey

     

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