Forum Discussion

veuleh's avatar
veuleh
New Member
5 years ago
Solved

Dax rank

Hey All

 

I'm new on Powerbi and trying to find my way but cannot solve my issue.

 

I need to populate a list of parts that are selling and take 20% of the total amount of that day. 

 

So my list looks 

 

Artikel_IDDateItems_Sold 
AA1/05/202020 
BB1/05/202030 
CC1/05/202040 
DD1/05/202050 
AA1/06/202030 
DD1/06/202020 
CC1/08/202030 
EE1/08/202040 
    
    
Output needed   
Artikel_IDDateItems_Sold% Items_Sold  on total of that day
DD1/05/20205036%
AA1/06/20203060%
EE1/08/20204057%
    

 

Is there a way to do?

 

Already many thanks

  • Hi,

    Create two measures.

    First measure:

     

    Filter Measure =
    VAR DailyMax =
        CALCULATE ( MAX ( 'Table'[Items_Sold] ), ALLEXCEPT ( 'Table', 'Table'[Date] ) )
    RETURN
        SUMX ( 'Table', 0 + ( 'Table'[Items_Sold] = DailyMax ) )

     

    Second measure:

     

    % Daily Items Sold =
    DIVIDE (
        SUM ( 'Table'[Items_Sold] ),
        CALCULATE ( SUM ( 'Table'[Items_Sold] ), ALLEXCEPT ( 'Table', 'Table'[Date] ) )
    )

     

    Create a simple table visual with Artikel_IDDateItems_Sold from your table as well as the % Daily Items Sold measure above. Then drag the other measure - Filter Measure - into the filters pane and set the condition as 'Show items when the value is equal to 1'.

    Regards

3 Replies

  • Hi,

    Create two measures.

    First measure:

     

    Filter Measure =
    VAR DailyMax =
        CALCULATE ( MAX ( 'Table'[Items_Sold] ), ALLEXCEPT ( 'Table', 'Table'[Date] ) )
    RETURN
        SUMX ( 'Table', 0 + ( 'Table'[Items_Sold] = DailyMax ) )

     

    Second measure:

     

    % Daily Items Sold =
    DIVIDE (
        SUM ( 'Table'[Items_Sold] ),
        CALCULATE ( SUM ( 'Table'[Items_Sold] ), ALLEXCEPT ( 'Table', 'Table'[Date] ) )
    )

     

    Create a simple table visual with Artikel_IDDateItems_Sold from your table as well as the % Daily Items Sold measure above. Then drag the other measure - Filter Measure - into the filters pane and set the condition as 'Show items when the value is equal to 1'.

    Regards

  • Artikel_IDDateItems_Sold 
    AA1/05/202020 
    BB1/05/202030 
    CC1/05/202040 
    DD1/05/202050 
    AA1/06/202030 
    DD1/06/202020 
    CC1/08/202030 
    EE1/08/202040 
        
        
    Output needed   
    Artikel_IDDateItems_Sold% Items_Sold  on total of that day
    DD1/05/20205036%
    AA1/06/20203060%
    EE1/08/20204057%
        

     

    Sorry Data of tables where not uploaded correctly

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi veuleh,

    Did Jos_Woolley 's suggestions help with your scenario? if that is the case, you can consider Kudo or accept the suggestion to help others who faced similar requirements.

    If these also don't help, please share more detailed information about your requirement to help us clarify your scenario and test.

    How to Get Your Question Answered Quickly 

    Regards,

    Xiaoxin Sheng