Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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.
User | Count |
---|---|
98 | |
90 | |
82 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
67 |