Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Rygar
Helper II
Helper II

Apply the Result of SWITCH and ISINSCOPE to a different Visual

Hi Community,

depending on a selected scope in a visual, different calculation are being applied and this works very fine:

 

 

Available = 
SWITCH (
    TRUE (),
    ISINSCOPE ( 'Date'[Month] ), SUM ( 'Available Capacity'[Capacity] ) / 12,
    ISINSCOPE ( 'Date'[Quarter] ), SUM ( 'Available Capacity'[Capacity] ) / 4,
    ISINSCOPE ( 'Date'[Year] ), SUM ( 'Available Capacity'[Capacity] )
)

 

 

Now I would like to have the Result of the 'Available'-Measure as Maximum Field in a Gauge-Visual. Unfurtunately the Result of the Measure 'Available' always seems to be FALSE for the Gauge-Visual.

Bild1.png

.pbix Example File here.

Thanks & kind Regards Michael

 

3 REPLIES 3
Ghuiles
Advocate IV
Advocate IV

The last line provided by @amitchandak is the default.

, SUM ( 'Available Capacity'[Capacity] )

It simply means, that in case the previous cases from the SWITCH statement were not "true", then this default line will apply.

Cheers. G.

amitchandak
Super User
Super User

@Rygar , because isinscope works for context, meaning they should be available in visual. Add a default here.

 

Available = 
SWITCH (
    TRUE (),
    ISINSCOPE ( 'Date'[Month] ), SUM ( 'Available Capacity'[Capacity] ) / 12,
    ISINSCOPE ( 'Date'[Quarter] ), SUM ( 'Available Capacity'[Capacity] ) / 4,
    ISINSCOPE ( 'Date'[Year] ), SUM ( 'Available Capacity'[Capacity] )
, SUM ( 'Available Capacity'[Capacity] )
)

Thanks for your Answer, unfortunately I dont understand what kind of default I should add.

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors