Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Meg_01
New Member

Dax

Need help

How can get I top products bought by each gender in a bar chart using no or simplest dax 

when I do top products by female and male using filter I get correct output but together in bar chart I get wearing output

 

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @Meg_01 ,

Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

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

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
bhanu_gautam
Super User
Super User

@Meg_01 

Rank the products by gender:
ProductRankByGender =
RANKX(
FILTER(
ALL('Sales'),
'Sales'[Gender] = EARLIER('Sales'[Gender])
),
CALCULATE(SUM('Sales'[Quantity])),
,
DESC

Filter the top products:
TopProductsByGender =
CALCULATETABLE(
'Sales',
'Sales'[ProductRankByGender] <= 5
)

For more share sample data




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements