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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
PatrickPerovan
Frequent Visitor

Measures with Slicer (Edit Interaction)

Hello everybody,

I'm stuck trying to solve a question that seems simple, but it's been giving me a bit of work.


Imagine that I have a table with:

- Year
- Month
- Ticket number


I created some cards like:

 

- Total Tickets Year: I created with the number of tickets for the desired year, using the visual filter.


- Current Total Tickets Month: I inserted a slicer, in order to be more dynamic, and when selecting the month in question, using the "Edit Interaction" and the result is seen inside the card.

 

- % Participation Month/Year: In this part I'm stuck.

 

Because it is an interactive filter, I am not able to create a measure that is variable according to the selection made in the selection box.

 

Can anyone help me?

 

EDITED:

Example below:

 

PatrickPerovan_0-1659449220334.png

 

In green: all information filtered by "Edit interaction".

 

In red: The information I need. According to the month I select, all the information of "All Tickets", "Completed" and Open will be different, and I need to calculate the participation %.

 

 

 

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

Hi @PatrickPerovan ,

 

Please try these measure.

 

Current Year Value = 
CALCULATE (
    SUM ( 'Table'[Value] ),
    FILTER ( ALL ( 'Table' ), 'Table'[Date].[Year] = MAX ( 'Table'[Date].[Year] ) )
)
% Participation Month/Year = 
DIVIDE ( SUM ( 'Table'[Value] ), [Current Year Value] )

vkkfmsft_0-1659686810920.png


If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-kkf-msft
Community Support
Community Support

Hi @PatrickPerovan ,

 

Please try these measure.

 

Current Year Value = 
CALCULATE (
    SUM ( 'Table'[Value] ),
    FILTER ( ALL ( 'Table' ), 'Table'[Date].[Year] = MAX ( 'Table'[Date].[Year] ) )
)
% Participation Month/Year = 
DIVIDE ( SUM ( 'Table'[Value] ), [Current Year Value] )

vkkfmsft_0-1659686810920.png


If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@PatrickPerovan , Better to have a separate month year table(Say Date)  with key Year, month and columns of month and year too

 

Then year value

calculate(Count(Table[Ticket Number]), filter(all(Date), Date[Year] = max(Date[Year]) ) )

 

year value with same table

calculate(Count(Table[Ticket Number]), filter(all(Table), Table[Year] = max(Table[Year]) ) )

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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