Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
87 | |
81 | |
53 | |
37 | |
35 |