Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Power BI Dynamic Grouping

I've a requirement on a Table to summarise the data based on below scenarios: The Table 1 is the existing, the Table 2 is what is expecting. Table 1 Item# ItemName Reason Catogery LostSales ...
  • saykasku's avatar
    7 years ago

    Hi,

     

    You need to create measure like this:

     
    Reason_new = 
    var _Reason = LASTNONBLANK(Arkusz1[Reason];1)
    RETURN
    IF(
        CALCULATE( DISTINCTCOUNT(Arkusz1[Reason]) ;
        all(Arkusz1[Reason])) > 1
        ;"Mixed"
        ;_Reason
        )

    This is solution for you.