March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi Experts,
I want to calculate MAX and MIN value of the Profit column with respect to the values selected in Slicer available. Attaching sample data here.
Slicer/Fiters on page: Region, Targets, Week
Measure to calculate: Divide( (Profit - MIN of Profit), (MAX of Profit - MIN of Profit ) )
Regions | Category | Profit | Target | Week |
West | 101 | 0.000215 | A | 1 |
West | 102 | 0.000277 | B | 1 |
West | 103 | 0.000323 | C | 2 |
West | 104 | 0.00017 | A | 2 |
West | 105 | 0.000189 | B | 3 |
West | 106 | 0.000225 | C | 3 |
West | 107 | 0.000217 | A | 4 |
West | 108 | 0.000167 | B | 4 |
West | 109 | 0.000129 | C | 5 |
West | 110 | 0.000179 | A | 5 |
West | 111 | 0.000176 | B | 6 |
West | 112 | 0 | C | 6 |
West | 113 | 8.06E-05 | A | 7 |
East | 114 | 0.00017 | B | 1 |
East | 115 | 0.000164 | C | 1 |
East | 116 | 0 | A | 2 |
East | 117 | 0.001332 | B | 2 |
East | 118 | 0.002236 | C | 3 |
East | 119 | 0.002129 | A | 4 |
East | 120 | 0.001288 | B | 5 |
East | 121 | 0.001217 | C | 6 |
North | 122 | 0.001057 | A | 1 |
North | 123 | 0.001839 | B | 1 |
North | 124 | 0.000703 | C | 2 |
North | 125 | 0.000653 | A | 2 |
North | 126 | 0.000958 | B | 3 |
North | 127 | 0.000332 | C | 4 |
North | 128 | 0.000684 | A | 5 |
North | 129 | 0.000743 | B | 6 |
North | 130 | 0.000887 | C | 7 |
North | 131 | 0.001415 | A | 7 |
South | 132 | 0.000582 | B | 1 |
South | 133 | 0.00084 | C | 1 |
South | 134 | 0.00027 | A | 2 |
South | 135 | 0.001124 | B | 2 |
South | 136 | 0.001124 | C | 3 |
South | 137 | 0.000514 | A | 4 |
South | 138 | 0.000697 | B | 5 |
South | 139 | 0.000652 | C | 6 |
South | 140 | 0.000336 | A | 7 |
South | 141 | 0.000469 | B | 7 |
South | 142 | 0.000319 | C | 7 |
Solved! Go to Solution.
@Uzi2019 Oh, just use MINX(ALLSELECTED('Table'),[Profit])
@Uzi2019 You can also try this measure:
@Uzi2019 Try:
Measure to calculate: DIVIDE( MIN('Table'[Profit]), MAX('Table'[Profit]) - MIN('Table'[Profit]) )
@Greg_Deckler Thanks for your reply. But when made the selection from top slicers available so it should compute MIN and MAX overall. Like If Region selects as South so overal MIN value of South shoudl get computed like wise for MAX. I think we should leverage MINX and MAXX for this but I am getting wrong answers that's why I hope community would help me. 😀
@Uzi2019 I am attaching sample PBIX file below signature. Perhaps I am not understanding your requirements but the calculation seems to work for me.
@Greg_Deckler Thanks for your efforts. I gues we are closer to the solution. To demystify the actual requirement I am attaching below screen shot for your reference and added note alsoin text box.
Let's break them into two measures for MIN and MAX. and I need same MIN values in all rows (may be to use ALLSelected or RemoveFilters). right now which is coming in only grand total row but this value I need in all rows as per the slicers selection.
Let me know incase of any doubts.
@Uzi2019 You can also try this measure:
@Uzi2019 Oh, just use MINX(ALLSELECTED('Table'),[Profit])
Hi @Greg_Deckler
Your solution is working fine for sample data. But when I applied it to an actual data this is not giving correct result.
Thank you so much for your efforts.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
87 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |