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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Dax Query

Hi Team,

 

I am new to Bi and stucked into one of the issue in which i want to show the minimum value in matrix. For example - suppose there are 3 trainings (A,B,C) and in india 3 people completed training A, 2 completed B, 1 person completed C respectively. So when i click the plus button in matrix to see the number of the people its showing me 3 but i want the minimum value i.e. 1. How can i get this. its important. 

Attaching screen shot for the reference. 

 

rastoiyashu4_1-1695383628445.png

 

5 REPLIES 5
mickey64
Super User
Super User

Step 1: I use ’DATA’ table below.

mickey64_0-1695385079279.png

Step 2: I make a measure.

    Min Number = CALCULATE(MIN('DATA'[Number]),ALLEXCEPT('DATA',DATA[Country]))

 

Step 3: Imake a matrix.

mickey64_1-1695385167126.png

 

'DATA' table:

Country Trainings Number
India A 3
India B 2
India C 1
USA A 6
USA B 5
USA C 4
UK A 8
UK B 7
UK C 3

Anonymous
Not applicable

Hi Mickey64,

 

You have taken the min of number which is a numerical column for you but for me i have a cloumn as full name of the candidates who have completed the training and for that i can't take minimum.  Attaching screen shot of data as reference purpose.

rastoiyashu4_0-1695387654620.png

So for name again i can't take minimum.

Step 1: I use your data named 'DATA_2'.

mickey64_0-1695389123940.png

Step 2: I make a summarize table named 'Country Table'.

    Country Table = SUMMARIZE('DATA_2','DATA_2'[Country],DATA_2[Trainings])

mickey64_2-1695389278299.png

Step 3: I add 'Key' column  to the 'Country Table'.

    Key = [Country]&"_"&[Trainings]

mickey64_7-1695389839544.png

 

Step 4: I add 'Key' column to the 'DATA_2' table.

    Key = [Country]&"_"&[Trainings]

mickey64_4-1695389536571.png

Step 5: I add a relationship.

mickey64_5-1695389599345.png

Step 6: I add 'Count' column to the 'Country Table'.

    Count = CALCULATE(COUNTROWS('DATA_2'),ALLEXCEPT('Country Table','Country Table'[Key]))

mickey64_6-1695389802363.png

Step 7: I make 2 measures.

    Min Number_2 = CALCULATE(MIN('Country Table'[Count]),ALLEXCEPT('Country Table','Country Table'[Country]))
    Max Number_2 = CALCULATE(MAX('Country Table'[Count]),ALLEXCEPT('Country Table','Country Table'[Country]))
 
Step 8: I make a matrix.
mickey64_8-1695390196090.png

 

 

HarishKM
Memorable Member
Memorable Member

@Anonymous Hello,
You can try this method as per image .

HarishKM_0-1695384490298.png



Thanks
Harish M

 

Syndicate_Admin
Administrator
Administrator

HarishKM_1-1695384248586.png

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.