Forum Discussion
Help with a measure needed
I've been trying to use ChatGPT to work out how to do what I'm trying to do, but have failed so far, so are hoping you can help!
I have a table in my data, called D_Forces. It has just two columns. The first is Force and there are 44 rows. The second is Region. Each Force belongs to one of 13 Regions (apart from the National Total which has no region assigned to it).
What I want to be able to do is have a single slicer on a page where the user selects the Force. Most visuals on the page will filter to show data for that single force. However, I also want some graphs (e.g. line graphs) to show the trend for all the forces within the same region.
So I need a measure which will tell the graph which forces it needs to show (the ones with the same region as the selected force on the slicer).
Can anyone suggest how to do this? The ChatGPT suggestions are either throwing up errors within the formula or are not producing the desired result.
Thsnks in advance!
6 Replies
- DataInsightsSuper User
Try a measure like this, where Base Measure is the underlying measure that aggregates a column:
Region Measure = CALCULATE ( [Base Measure], ALL ( D_Forces[Force] ), VALUES ( D_Forces[Region] ) ) - Ashish_MathurSuper User
Hi,
I have solved a similar question in the attached file.
Hope this helps.
- JennaExeHelper I
Hi Ashish,
I definitely think this is very similar to what I'm trying to achieve, thank you - are you able to help me understand how to map this across to my data to work for me?
In my data, the Force name column is the equivalent of your Unique ID, because each name is different, and that is what I want to display in my slicer for people to select from. The Model column is the equivalent of my Region column. So when a user selects the Force name (unique ID), I want it to display all the Force names (Unique IDs) from the same Region (Model). I don't think I have an equivalent of your Location column, because the Force name is the Location too...
Also, I don't know if it's relevant, but I have multiple datasets in my report which all have the Force/Region columns within them, so I'm hoping the solution is one that uses my D_Forces table which is linked to all the other datasets, so I only have to set up the measures once and they can be applied to everything?
Any further help would be greatly appreciated, thank you!
- Ashish_MathurSuper User
Hi,
After studying my solution, please try to solve it on your own.
- AnonymousNot applicable
Hi JennaExe79 ,
Did Ashish_Mathur reply solve your problem? If so, please mark it as the correct solution, and point out if the problem persists.Best regards,
Adamk Kong