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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
DannyVos93
Regular Visitor

Extract more than one value from a slicer

Hello! I need help with this dashboard. This dashboard is supposed to show our four main indicators (cycle time, lead time, deployed releases and Success rate) per quarter.

High management wants to compare the indicators in pairs, and they want to know the variability percentage of the two selected quarters (“Variación”, it’s a card placed on the line charts), so they can see if we are improving or decreasing our productivity and quality.

I have a Quarter (trimestre) slicer where they can select the quarters as they’d like (be mindful that these quarters are customized, they don’t follow Power BI’s hierarchy).

Right now since only two quarters are completed Q3 2024 and Q4 2024, the variability cards are fixed via different measures, but we need this to be dynamic, so whenever a pair of quarters is selected from the slicer, the variability card shows the respective percentage for those two quarters.

Does any of you have any idea of how this can be achieved? I have been trying and I know the SELECTEDVALUE() function might be the key, but I don’t know if it can catch two different values from the same slicer.

Any help and suggestions are appreciated!

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @DannyVos93 

 

Yes, you can definitely achieve this dynamically!
The idea is to create two separate measures:

  • One for the first selected quarter

  • One for the second selected quarter

Then you can calculate the variation between them.

However, it’s important to note: if your slicer is based on a separate Quarter dimension table (which is the correct modeling practice), you must reference the quarter from that dimension table — not directly from your fact table — to avoid issues when no data exists for a selected quarter.

Here’s a safe and scalable approach:

  1. Capture the minimum and maximum selected quarters from the Quarter dimension.

  2. Create two measures, each filtered on one quarter.

  3. Calculate the percentage variation between them.

Dax example :

Selected_Min_Quarter = MIN('Quarters'[Quarter])
Selected_Max_Quarter = MAX('Quarters'[Quarter])

Value_Min_Quarter =
CALCULATE(
[YourBaseMeasure],
FILTER(
ALL('Quarters'),
'Quarters'[Quarter] = [Selected_Min_Quarter]
)
)

Value_Max_Quarter =
CALCULATE(
[YourBaseMeasure],
FILTER(
ALL('Quarters'),
'Quarters'[Quarter] = [Selected_Max_Quarter]
)
)

Variation_Percentage =
DIVIDE(
(Value_Max_Quarter - Value_Min_Quarter),
Value_Min_Quarter,
0
)


If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

6 REPLIES 6
v-tsaipranay
Community Support
Community Support

Hi @DannyVos93 ,

Thank you for reaching out to the Microsoft Fabric Community.


I wanted to check if you had the opportunity to review the information provided by @Ritaf1983 . Please feel free to contact us if you have any further questions. If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.


Thank you.

Hello! Thank you for following up.

@Ritaf1983 

Yesterday I tried the suggested solution and unfortunately it worked partially, I am able to properly catch the values of the quarters, but it is not properly calculating the values of my KPIs, in the screenshot below, you can see that it gets the same value, 58.20, when it should be 41.76 and 82.16, respectively. 

IMG_8802.jpeg


I do have to mention that, I did not have a Quarters table, but I did have a Calendar table with the respective Quarter and a QuarterOrder columns. However, I created the Quarters table and connected it to the Calendar table, I don't know if it was unnecessary. I tried using the Quarters field directly from the Calendar column and got similar results.

 

Is there anything I'm missing out here?

Hi @DannyVos93 

Unfortunately, I can't provide a more detailed solution without access to your file.
Based on the general information you provided, the solution I shared should work without the need for an additional quarters table, assuming your calendar table includes a quarter column.
To assist further, I would need access to your data model.
Please create a small dataset that reflects the structure of your model with only the relevant data, and share it via any public cloud service.
Also, include an example of the expected result.
Without these, it's not possible to provide support beyond what I’ve already shared.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Hello Rita, I completely understand and I am very grateful for your assistance on this matter.

 

I will try again the resolution you provided, maybe I missed something and I won't create the Quarters table, I will do it with my Calendar table which do has the Quarter column. 

 

If the issue persists I will try to share an adapted file for you to check further. Again thank you so much for your assistance and follow up.

Hello @Ritaf1983!
After some attempts what I ended up doing was creating the Value measures differently.

 

The individual measures to capture de value of the selected quarters, using MIN and MAX functions were not working, link the values were not being saved when I used them on the other measures. So I tried using variables.

This is how I did it:

Value_Min_Quarter = 
VAR Selected_Min_Quarter = MIN(Calendar[Quarter])
RETURN
CALCULATE(
[Measure],
Calendar[Quarter] = Selected_Min_Quarter
)

Value_Max_Quarter =
VAR Selected_Max_Quarter = MAX(Calendar[Quarter])
RETURN
CALCULATE(
[Measure],
Calendar[Quarter] = Selected_MAX_Quarter
)

 So I basically applied the same logic you came up with in a different way and it's working like charm! I did not make changes to the Variation _Percentage measure.

 

Thank you so very much for the continuos assistance and follow up, you were great!

Ritaf1983
Super User
Super User

Hi @DannyVos93 

 

Yes, you can definitely achieve this dynamically!
The idea is to create two separate measures:

  • One for the first selected quarter

  • One for the second selected quarter

Then you can calculate the variation between them.

However, it’s important to note: if your slicer is based on a separate Quarter dimension table (which is the correct modeling practice), you must reference the quarter from that dimension table — not directly from your fact table — to avoid issues when no data exists for a selected quarter.

Here’s a safe and scalable approach:

  1. Capture the minimum and maximum selected quarters from the Quarter dimension.

  2. Create two measures, each filtered on one quarter.

  3. Calculate the percentage variation between them.

Dax example :

Selected_Min_Quarter = MIN('Quarters'[Quarter])
Selected_Max_Quarter = MAX('Quarters'[Quarter])

Value_Min_Quarter =
CALCULATE(
[YourBaseMeasure],
FILTER(
ALL('Quarters'),
'Quarters'[Quarter] = [Selected_Min_Quarter]
)
)

Value_Max_Quarter =
CALCULATE(
[YourBaseMeasure],
FILTER(
ALL('Quarters'),
'Quarters'[Quarter] = [Selected_Max_Quarter]
)
)

Variation_Percentage =
DIVIDE(
(Value_Max_Quarter - Value_Min_Quarter),
Value_Min_Quarter,
0
)


If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors