Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
76 | |
63 | |
51 | |
48 |
User | Count |
---|---|
204 | |
86 | |
64 | |
59 | |
56 |