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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Clikojo
Frequent Visitor

Sync slicers created by field parameters

Hi all,

I used this video to create some KPI visuals to demonstrate % change to previous month and previous quater. For example, on the card visual it will show total customers, % change compared to last month and % changed comapred to previous quater.

To filter on which comparison the values should show, I created a slicer by creating field parameters based on the previous month and previous quater meausres. Now my issue is if i want to create more card visuals I have to create more slicers in the same method. Can I sync these slicers somehow? Here is an exaple of the DAX that is an input to the meaure used in my field parameter

CW KPI new users vs prev month =
VAR _var = [CW_New] - [CW_PreviousMonth]
VAR _pct = DIVIDE([CW_New], [CW_PreviousMonth]) - 1
VAR _sign = IF(_var > 0, "+", "")
RETURN
_sign & FORMAT(_pct, "#0.0%") & " | " & _sign & FORMAT(_var, "#0,#")



Thanks in advance!

2 ACCEPTED SOLUTIONS
speedramps
Super User
Super User

Please can you describe your problem more clearly with examples.

Dont rush. You will get quicker and better answers if you put time and effort into the question.

 

Have you consider using Field Parametrs and Calculation Groups?

 

If you have a field paramater for total orders, sales $, cost of sales and proifit $.

 

Then you create a calcuation group for This Month, Last Month or Difference and add the claulcation group to slicer then the calculatin group will apply to all the measures, just like magic !

 

learn how here 

 

https://learn.microsoft.com/en-us/power-bi/transform-model/calculation-groups

 

Please click the thumbs up and [accept solution] buttons, 

Thank you

 

View solution in original post

maruthisp
Super User
Super User

Hi Clikojo,
As per your description, you have a Fact Table and Date Dimension table.

 Step 1: Create Base Measures

Total Customers = SUM(CustomerMetrics[CustomerCount])
 

Previous Month Customers =
CALCULATE(
    [Total Customers],
    DATEADD(DateTable[Date], -1, MONTH)
)
 

Previous Quarter Customers =
CALCULATE(
    [Total Customers],
    DATEADD(DateTable[Date], -1, QUARTER)
)

Step 2: Create Comparison Measures

Change vs Previous Month =
VAR Diff = [Total Customers] - [Previous Month Customers]
VAR Pct = DIVIDE(Diff, [Previous Month Customers])
RETURN FORMAT(Pct, "0.0%") & " | " & FORMAT(Diff, "#,0")
 

Change vs Previous Quarter =
VAR Diff = [Total Customers] - [Previous Quarter Customers]
VAR Pct = DIVIDE(Diff, [Previous Quarter Customers])
RETURN FORMAT(Pct, "0.0%") & " | " & FORMAT(Diff, "#,0")


Step 3: Create a Field Parameter


ComparisonSelector = {
    ("Change vs Previous Month", [Change vs Previous Month], 0),
    ("Change vs Previous Quarter", [Change vs Previous Quarter], 1)
}

Step 4: Use the Parameter in Visuals
Use the ComparisonSelector field in a slicer and use the Selected Measure in your card visuals.

 

View solution in original post

5 REPLIES 5
v-hjannapu
Community Support
Community Support

Hi @Clikojo,

Thank you  for reaching out to the Microsoft fabric community forum.

I would also take a moment to thank @maruthisp, and @speedramps  for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
 

I wanted to check if you had the opportunity to review the information provided. 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 so that other community members can find it easily.

 

Best Regards,

Harshitha.

Community Support Team.

Hi @Clikojo ,

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please Accept it as a solution so that other community members can find it easily.

Best Regards,

Harshitha.

Community Support Team.

Hi @Clikojo,

May I ask if you have resolved this issue? If so, please mark the helpful reply and Accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Best Regards,

Harshitha.

Community Support Team.

maruthisp
Super User
Super User

Hi Clikojo,
As per your description, you have a Fact Table and Date Dimension table.

 Step 1: Create Base Measures

Total Customers = SUM(CustomerMetrics[CustomerCount])
 

Previous Month Customers =
CALCULATE(
    [Total Customers],
    DATEADD(DateTable[Date], -1, MONTH)
)
 

Previous Quarter Customers =
CALCULATE(
    [Total Customers],
    DATEADD(DateTable[Date], -1, QUARTER)
)

Step 2: Create Comparison Measures

Change vs Previous Month =
VAR Diff = [Total Customers] - [Previous Month Customers]
VAR Pct = DIVIDE(Diff, [Previous Month Customers])
RETURN FORMAT(Pct, "0.0%") & " | " & FORMAT(Diff, "#,0")
 

Change vs Previous Quarter =
VAR Diff = [Total Customers] - [Previous Quarter Customers]
VAR Pct = DIVIDE(Diff, [Previous Quarter Customers])
RETURN FORMAT(Pct, "0.0%") & " | " & FORMAT(Diff, "#,0")


Step 3: Create a Field Parameter


ComparisonSelector = {
    ("Change vs Previous Month", [Change vs Previous Month], 0),
    ("Change vs Previous Quarter", [Change vs Previous Quarter], 1)
}

Step 4: Use the Parameter in Visuals
Use the ComparisonSelector field in a slicer and use the Selected Measure in your card visuals.

 

speedramps
Super User
Super User

Please can you describe your problem more clearly with examples.

Dont rush. You will get quicker and better answers if you put time and effort into the question.

 

Have you consider using Field Parametrs and Calculation Groups?

 

If you have a field paramater for total orders, sales $, cost of sales and proifit $.

 

Then you create a calcuation group for This Month, Last Month or Difference and add the claulcation group to slicer then the calculatin group will apply to all the measures, just like magic !

 

learn how here 

 

https://learn.microsoft.com/en-us/power-bi/transform-model/calculation-groups

 

Please click the thumbs up and [accept solution] buttons, 

Thank you

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.