Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I want to show the one Max and One Min Amount on slicer selection on Grid (Table).
I have Product, Category, Subcategory, Country, Min Amount and Max Amount, these columns available on my grid.
On one slicer I have created a hierarchy of Product and Category and on another slicer I have created the hierarchy of Region and Country.
When I select the Product from the slicer it should show One Min and One Max value, same goes for Region, and country as well. I want to see only two rows (Min and Max value) on my grid.
TIA
Solved! Go to Solution.
Perhaps the following can help.
My sample:
1. Create two Calculated tables as slicer table
Product = SELECTCOLUMNS('Table', "Product", [Product], "Category", [Category])
Region = SELECTCOLUMNS('Table', "Region", [Region], "Country", [Country])
2. Create a measure as follows
measure =
VAR _maxValue = CALCULATE(MAX([Value]), FILTER(ALL('Table'), [Product] = SELECTEDVALUE('Product'[Product]) && [Category] = SELECTEDVALUE('Product'[Category]) || [Region] = SELECTEDVALUE(Region[Region]) && [Country] = SELECTEDVALUE(Region[Country])))
VAR _minValue = CALCULATE(MIN([Value]), FILTER(ALL('Table'), [Product] = SELECTEDVALUE('Product'[Product]) && [Category] = SELECTEDVALUE('Product'[Category]) || [Region] = SELECTEDVALUE(Region[Region]) && [Country] = SELECTEDVALUE(Region[Country])))
RETURN
IF(MAX([Value]) = _maxvalue || MAX([Value]) = _minvalue, 1, 0)
3. Put the measure into the visual-level filters, set up show items when the value is 1.
Is this the result you expect?
If I've misunderstood you, please provide detailed sample data and the results you are hoping for: How to provide sample data in the Power BI Forum - Microsoft Fabric Community . Or show it as a screenshot or pbix. Please remove any sensitive data in advance. If uploading pbix files please do not log into your account. We can better understand the problem and help you.
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks, for the solution
Perhaps the following can help.
My sample:
1. Create two Calculated tables as slicer table
Product = SELECTCOLUMNS('Table', "Product", [Product], "Category", [Category])
Region = SELECTCOLUMNS('Table', "Region", [Region], "Country", [Country])
2. Create a measure as follows
measure =
VAR _maxValue = CALCULATE(MAX([Value]), FILTER(ALL('Table'), [Product] = SELECTEDVALUE('Product'[Product]) && [Category] = SELECTEDVALUE('Product'[Category]) || [Region] = SELECTEDVALUE(Region[Region]) && [Country] = SELECTEDVALUE(Region[Country])))
VAR _minValue = CALCULATE(MIN([Value]), FILTER(ALL('Table'), [Product] = SELECTEDVALUE('Product'[Product]) && [Category] = SELECTEDVALUE('Product'[Category]) || [Region] = SELECTEDVALUE(Region[Region]) && [Country] = SELECTEDVALUE(Region[Country])))
RETURN
IF(MAX([Value]) = _maxvalue || MAX([Value]) = _minvalue, 1, 0)
3. Put the measure into the visual-level filters, set up show items when the value is 1.
Is this the result you expect?
If I've misunderstood you, please provide detailed sample data and the results you are hoping for: How to provide sample data in the Power BI Forum - Microsoft Fabric Community . Or show it as a screenshot or pbix. Please remove any sensitive data in advance. If uploading pbix files please do not log into your account. We can better understand the problem and help you.
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
100 | |
99 | |
80 | |
77 | |
66 |
User | Count |
---|---|
134 | |
108 | |
104 | |
83 | |
73 |