Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. 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.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 64 | |
| 32 | |
| 31 | |
| 27 |