Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.
Hello,
I'm new to Power BI and am trying to get the MAX and/or MIN value from the Measures that I create.
As seen from the print screen, I'm trying to get the MIN or MAX from each row of product type from measure [Avg. Amount].
My desired result is the red box in the screen that I need to be in measures as well.
I have attach a very small sample size of the power bi file, but note that the MIN and MAX in the file is not working as to what I desire in the screenshot below
Solved! Go to Solution.
Hi,
Try these measures
MIN = if(ISBLANK([Avg. Amount]),BLANK(),MINX(GENERATE(ALLSELECTED(tblDate[Fiscal Year],tblDate[Fiscal Quarter]),ALLSELECTED(tblData[MPC],tblData[Product Type])),[Avg. Amount]))
MAX = if(ISBLANK([Avg. Amount]),BLANK(),MAXX(GENERATE(ALLSELECTED(tblDate[Fiscal Year],tblDate[Fiscal Quarter]),ALLSELECTED(tblData[MPC],tblData[Product Type])),[Avg. Amount]))
Hope this helps.
@AnkitaaMishra and @Ashish_Mathur
I have update my post with updated screenshot with my desired result and attach a small sample size pbix file.
Thanks for your help in advanced
Hi,
Try these measures
MIN = if(ISBLANK([Avg. Amount]),BLANK(),MINX(GENERATE(ALLSELECTED(tblDate[Fiscal Year],tblDate[Fiscal Quarter]),ALLSELECTED(tblData[MPC],tblData[Product Type])),[Avg. Amount]))
MAX = if(ISBLANK([Avg. Amount]),BLANK(),MAXX(GENERATE(ALLSELECTED(tblDate[Fiscal Year],tblDate[Fiscal Quarter]),ALLSELECTED(tblData[MPC],tblData[Product Type])),[Avg. Amount]))
Hope this helps.
@Ashish_Mathur Thank you for your help.
Quick question, on the 2nd half of the ALLSELECTED() that looks at tblData[MPC] and tblData[Product Type].
If I were to remove this filter criteria from the measure, will it work with the Filter Pane (Filter Pane is where it's the same pane with 'Visualization" and 'Data" and/or slicer?
ALLSELECTED(tblData[MPC],tblData[Product Type])
You are welcome. It should.
Hi @JustDavid , Could you please elaborate what about your problem statement or share some sample output what you are referring to.
Hi,
I cannot understand your question. Share some data to work with, explain the question and show the expected result.
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
76 | |
75 | |
70 | |
47 | |
41 |
User | Count |
---|---|
62 | |
39 | |
32 | |
30 | |
28 |