We're giving away 30 tickets for FREE! Share your story, your vision, or your hustle and tell us why YOU deserve a ticket.
Apply nowWin a FREE 3 Day Ticket to FabCon Vienna. Apply now
Hi all,
I don't even know how to explain my issue. I need a DAX function that will sort the Price for the month by product and leave all the other rows blank.
Current data | Expected Result | |||||
Product | Price for the month | Product | Price for the month | |||
Iphone 13 | 300 | Iphone 13 | 300 | |||
Iphone 13 | 300 | Iphone 13 | ||||
Iphone 14 | 1000 | Iphone 14 | 1000 | |||
Iphone 14 | 1000 | Iphone 14 |
Is anyone able to help?
KR,
B
Hi,
I assume your table contains one more column that indicates the difference between the same product, for instance, date column or index column.
I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
It is for creating a new table.
Data table
Expected result table
Expected result table =
SUMMARIZE (
ADDCOLUMNS (
ADDCOLUMNS (
SUMMARIZE ( Data, Data[Index], Data[Product], Data[Price for the month] ),
"@indexmin", MINX ( FILTER ( Data, Data[Product] = EARLIER ( Data[Product] ) ), Data[Index] )
),
"@Price for the month", IF ( Data[Index] = [@indexmin], Data[Price for the month] )
),
Data[Product],
[@Price for the month]
)
User | Count |
---|---|
13 | |
12 | |
8 | |
8 | |
6 |
User | Count |
---|---|
28 | |
19 | |
13 | |
11 | |
7 |