Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi Users
Can you please help me with finding the maximum value based on filters?
Steps to be done:
1. Filter Measurement Type as Trial 1.
2. Filter Machine as 1011
3. In the quantity, you can see 3 rows as 5,8,1. This means that there are 8 measurements to be done but on 2 rows, only 5 & 1 measurement were done.
4. So, I need to determine the maxiumum value based on the mentioned filter. Can you please help me with this?
Please find the sample picture of the dataset below.
@amitchandak, @ValtteriN : Can you please help me out?
Solved! Go to Solution.
Hi all
Thanks for your comments. I managed to find a solution for my problem
In a measure variable,
#Meas =
CALCULATE(
MAXX(
SUMMARIZE(Table1,Table1[Measurement Type],Table1[Machine],"Count",COUNT(Table1[Qty]))
,[Count]
),ALLEXCEPT(Table1,Table1[Measurement Type],Table1[Machine]))
Hi,
According to your description, I can roughly understand your requirement, I think you can achieve this using the slicers in the Power BI and the visual TOPN filter:
You can create two slicers to place the field [Measurement Type] and [Machine] and a table chart to place the columns within the table, then you can set the visual filter as “TOPN” for the table chart like this:
And you can get what you want.
You can download my test pbix file below
If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.
How to Get Your Question Answered Quickly
Thank you very much!
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Russell-PBI
I need to apply filters as mentioned in the steps. Max(QTY) just shows the maximum value in the table
@Jo5hua22
Hi,
I think @Russell-PBI 's new solution should solve your issue.
Proud to be a Super User!
Do you mean you want a measure that itself is filtered, like this?:
Max Qty - 1011 and Trial 1 =
CALCULATE(
MAX('Table'[Qty])
, 'Table'[Machine] = 1011
, 'Table'[Measurement Type] = "Trial 1"
)
Hi @Jo5hua22, are we missing a piece of the puzzle as it looks like you could just use MAX aggregation on the Qty column?:
MAX(Qty)
Hi all
Thanks for your comments. I managed to find a solution for my problem
In a measure variable,
#Meas =
CALCULATE(
MAXX(
SUMMARIZE(Table1,Table1[Measurement Type],Table1[Machine],"Count",COUNT(Table1[Qty]))
,[Count]
),ALLEXCEPT(Table1,Table1[Measurement Type],Table1[Machine]))
@Russell-PBI Actually many pieces were missing but @Jo5hua22 clearified all to me before he eventually found the solution by himself. I think there is another post by him of the same.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
69 | |
35 | |
21 | |
18 | |
15 |
User | Count |
---|---|
126 | |
32 | |
28 | |
24 | |
24 |