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.
I have a custom measure, seen below, that is working quite well. However, i would like to modify it so that it ignores any selections made. I am using this in a custom card. I would like it to remain representative of the total it is calculating, instead of reacting to users selections.
-----------------------------------------------------------------
Solved! Go to Solution.
Got it,
To achieve this, you can use the ALL
function to remove any filters applied by slicers. Try it out and let me know.
KPIMarginLCM =
VAR _arrow =
SWITCH(
TRUE(),
[Sales GP % Margin LCM] > 999999999, "$#,##,,,.0B", // Up Arrow when the KPI is positive
[Sales GP % Margin LCM] > 999999, "$#,##,,.0M",
[Sales GP % Margin LCM] > 9999, "$#,##,K",
[Sales GP % Margin LCM] > 9, "$#,##,", // Down Arrow when the KPI is negative
" " // Empty space when the KPI is zero
)
VAR _metrics = CALCULATE([Sales GP % Margin LCM], ALL())
RETURN
FORMAT(_metrics, "0.0%") // Adjust the format based on your KPI type
& UNICHAR(10) &
VAR _arrow2 =
SWITCH(
TRUE(),
[Sales GP % Margin LCM YoY %] > 0, "▲", // Up Arrow when the KPI is positive
[Sales GP % Margin LCM YoY %] < 0, "▼", // Down Arrow when the KPI is negative
" " // Empty space when the KPI is zero
)
VAR _metrics2 = CALCULATE([Sales GP % Margin LCM YoY %], ALL())
RETURN
_arrow2 & " " & FORMAT(_metrics2, "0.0%") // Adjust the format based on your KPI type
Proud to be a Super User! | |
Got it,
To achieve this, you can use the ALL
function to remove any filters applied by slicers. Try it out and let me know.
KPIMarginLCM =
VAR _arrow =
SWITCH(
TRUE(),
[Sales GP % Margin LCM] > 999999999, "$#,##,,,.0B", // Up Arrow when the KPI is positive
[Sales GP % Margin LCM] > 999999, "$#,##,,.0M",
[Sales GP % Margin LCM] > 9999, "$#,##,K",
[Sales GP % Margin LCM] > 9, "$#,##,", // Down Arrow when the KPI is negative
" " // Empty space when the KPI is zero
)
VAR _metrics = CALCULATE([Sales GP % Margin LCM], ALL())
RETURN
FORMAT(_metrics, "0.0%") // Adjust the format based on your KPI type
& UNICHAR(10) &
VAR _arrow2 =
SWITCH(
TRUE(),
[Sales GP % Margin LCM YoY %] > 0, "▲", // Up Arrow when the KPI is positive
[Sales GP % Margin LCM YoY %] < 0, "▼", // Down Arrow when the KPI is negative
" " // Empty space when the KPI is zero
)
VAR _metrics2 = CALCULATE([Sales GP % Margin LCM YoY %], ALL())
RETURN
_arrow2 & " " & FORMAT(_metrics2, "0.0%") // Adjust the format based on your KPI type
Proud to be a Super User! | |
Thank you!
Hi,
You can do this without modifying your measure:
First, you need to select the slicer and make sure you are under Format Tab. Select Edit Interactions and then disable the visual you don't want an impact on.
Change how visuals interact in a report - Power BI | Microsoft Learn
Proud to be a Super User! | |
I was aware of that as well, but if a user utilizes hidden filters it will impact it. also i have a handfull of different custom measure i want to apply the logic too.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
73 | |
71 | |
38 | |
28 | |
26 |
User | Count |
---|---|
99 | |
88 | |
62 | |
42 | |
39 |