Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Show several measures with a filter

Hello everyone, 

 

I want to create a filter so users can select 'Profit', 'Costs' and/or 'Revenue'. This three aspects has to be shown in one graph. However, for every selection, there are measures created for every year (from 2017 up to and including 2021). 

 

I know it's possible to create a slicer which returns one measure, but I am not sure if and how it's possible to return five measure when you select 'Profit' for example. 

 

The table with two columns are added and a screenshot of my measure, the filer 'Selection' and the graph with the results how it supposed to be (the measure doesn't work, so this graph isn't shown).

 

The measure is as follows:

 

Profit =
VAR logictest =
COUNTROWS(
DISTINCT(FILTER(ALLSELECTED('Finance'[Selection]),
'Finance'[Selection] = "Profit")
)) = 1
RETURN
logictest = [Profit 2017] & [Profit 2018] & [Profit 2019] & [Profit 2020] & [Profit 2021]
 
Is there anyone who can help me with this?  

 

Finance selection.pngProfit.png

 

 

1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

Hi @Anonymous ,

 

So you have 5 measures for each selection? Can you add selection column to the measures as filter parameter so that you could create only 5 measures totally. And you may consider to add the year column to legend field so that you don't need to create measure for each year. Please correct me if I misunderstand your meaning.

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

2 REPLIES 2
v-jayw-msft
Community Support
Community Support

Hi @Anonymous ,

 

So you have 5 measures for each selection? Can you add selection column to the measures as filter parameter so that you could create only 5 measures totally. And you may consider to add the year column to legend field so that you don't need to create measure for each year. Please correct me if I misunderstand your meaning.

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
Anonymous
Not applicable

Hi @v-jayw-msft ,

 

Thank you! Adding the year column to the legend field was a big step forwards, and I didn't think of that. 

I still wanted to have all three aspects - profit, costs and revenue - in one visual. I used the trick as explained in this YouTube video:

 

https://www.youtube.com/watch?v=QUcW8gudhLw&list=PLUhDUnvehlCYsYDst81tOynW_HtCtZwK2&index=9&t=314s&a...

 

So, now I was able to show all years in one graph and easily going from one graph to another (profit, costs, revenue) without taking a up much space 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.