Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Thanks in advance!
Solved! Go to Solution.
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
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.
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.
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.
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
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
7 | |
7 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |