Forum Discussion
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_ID | Date | Items_Sold | |
| AA | 1/05/2020 | 20 | |
| BB | 1/05/2020 | 30 | |
| CC | 1/05/2020 | 40 | |
| DD | 1/05/2020 | 50 | |
| AA | 1/06/2020 | 30 | |
| DD | 1/06/2020 | 20 | |
| CC | 1/08/2020 | 30 | |
| EE | 1/08/2020 | 40 | |
| Output needed | |||
| Artikel_ID | Date | Items_Sold | % Items_Sold on total of that day |
| DD | 1/05/2020 | 50 | 36% |
| AA | 1/06/2020 | 30 | 60% |
| EE | 1/08/2020 | 40 | 57% |
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_ID, Date, Items_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
- Jos_Woolley
Solution Sage
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_ID, Date, Items_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
- veulehNew Member
Artikel_ID Date Items_Sold AA 1/05/2020 20 BB 1/05/2020 30 CC 1/05/2020 40 DD 1/05/2020 50 AA 1/06/2020 30 DD 1/06/2020 20 CC 1/08/2020 30 EE 1/08/2020 40 Output needed Artikel_ID Date Items_Sold % Items_Sold on total of that day DD 1/05/2020 50 36% AA 1/06/2020 30 60% EE 1/08/2020 40 57% Sorry Data of tables where not uploaded correctly
- AnonymousNot 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