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.
Hello,
I am hoping for some help with the following, after trying and failing numerous times. I have created two dummy tables for simplicity (see below). These tables have a one-to-many relationship based on the ID.
I am creating a page in my report that focuses on one Item in one Country at a time. There are various slicers, including Region. I am looking to create some benchmarks to compare the selected Item with its Category benchmarks. The benchmark I am struggling to create is the Max total Volume per Category, let's call this MaxBenchmark.
This is how I want it to work. If I select Item 1 and Country UK, total Volume would be 350 and MaxBenchmark should be 2,300 because Item 3 has the highest total Volume in Category A. If I select Item 2 and Country UK, total Volume would be 850, and MaxBenchmark should also be 850 because Item 2 has the highest total vol in Category B. An added complication, if I now select Region UKE, total Volume would be 50 and MaxBenchmark should be 100, because Item 4 has the highest Volume per Category in that Region.
I have been going round in circles with this for days so any guidance would be much appreciated!
Thanks 🙂
Solved! Go to Solution.
Hi @badger123
We'll create the two measures you talk about and the you can use them as you like in the gauge.
1. Set the Table2[ID] and Table1[Country] and Table1[Region] in slicers as you described
2. Create the measure for the selected item volume (which I believe you have already):
VolumeMeasure = SUM(Table1[ID])
3. Create the measure for the Max:
MaxBenchmark = VAR _ItemCategory = SELECTEDVALUE ( Table2[Category] ) VAR _CategoryVolumes = ADDCOLUMNS ( CALCULATETABLE ( VALUES ( Table2[ID] ); Table2[Category] = _ItemCategory; ALL ( Table2 ) ); "VolumeCol"; [VolumeMeasure] ) VAR _MaxInCat = MAXX ( _CategoryVolumes; [VolumeCol] ) RETURN _MaxInCat
I guess you've done stg different from what I described. It's working on my end. Have a look at this file.
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |