The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have the following structure of data.
Category | Segment | Brand | Sales |
A | S1 | B1 | 100 |
A | S1 | B2 | 0 |
A | S2 | B3 | 120 |
A | S5 | B4 | 140 |
A | S1 | B9 | 20 |
A | S1 | B21 | 25 |
A | S2 | B33 | 130 |
A | S5 | B20 | 90 |
A | S1 | B10 | 0 |
I want to show sales for all the Segment S1 and Top 3 in other Brands.
Result expected :
Category | Segment | Brand | Sales |
A | S1 | B1 | 100 |
A | S1 | B2 | 0 |
A | S1 | B9 | 20 |
A | S1 | B21 | 25 |
A | S1 | B9 | 20 |
A | S1 | B10 | 0 |
A | S5 | B4 | 140 |
A | S2 | B33 | 130 |
A | S2 | B3 | 120 |
Solved! Go to Solution.
Hi, @NandhuE31 , you might want to try a more flexible pattern; you can slicer the segments for keep certain segment while filtering other segments down to top 3. Pls refer to the attached file for details.
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
I have other filters in the data. It would be difficult to make them work asd calculated table .
Can it be done as measure or as calculated column?
Hi, @NandhuE31 , you might want to try a more flexible pattern; you can slicer the segments for keep certain segment while filtering other segments down to top 3. Pls refer to the attached file for details.
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Hi @NandhuE31
Assuming you want your expected result as Calculated Table
Then below Dax can help to achive this
Attached link is the Power BI file
https://dropfiles.org/Ml63iGvD
Regards
sanalytics
if it is your solution then please like and please accept it as solution