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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Anonymous
Not applicable

Selected value with multiple results

Hello everyone,

 

I have an issue with the following measure:

 


rMeasure Selection = VAR
Selection = SELECTEDVALUE('Selection Measure'[Selection Measure], "All")
Return SWITCH(true(),
Selection = "Scanning Time",[rTotal Amt Scanned / rTotal Hours Scanned],
Selection = "Clocking Time",[rTotal Amt Scanned / rTotal Hours Clocked],
[rTotaal Uren Probis Time] )

 

This measure is put into a graph with dates, and using filters, the user can see the average scans per hour for a certain person, based on clocking or scanning time. Now, I would like to make it so that when they select both, it shows both average per hour scanned and average per hour clocked.

 

Can anyone help me with this please?

 

Thanks!

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

Create a measure

Measure final =
VAR s2 =
    CONCATENATEX (
        'Table (3)',
        'Table (3)'[selection],
        ","
    )
RETURN
    SWITCH (
        TRUE (),
        s2 = "select1", [Measure],
        s2 = "select2", [Measure 2],
        s2 = "select1,select2", [Measure 3]
    )

Capture5.JPG

 

Or 

Measure 4 = 
VAR s2 =
    CONCATENATEX (
        'Table (3)',
        'Table (3)'[selection],
        ","
    )
RETURN
    SWITCH (
        TRUE (),
        s2 = "select1", FORMAT([Measure],"General Number"),
        s2 = "select2", FORMAT([Measure 2],"General Number"),
        s2 = "select1,select2","select1:"&FORMAT([Measure],"General Number")&" ,"&"select2:"&FORMAT([Measure 2],"General Number")
    )

Capture6.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

Create a measure

Measure final =
VAR s2 =
    CONCATENATEX (
        'Table (3)',
        'Table (3)'[selection],
        ","
    )
RETURN
    SWITCH (
        TRUE (),
        s2 = "select1", [Measure],
        s2 = "select2", [Measure 2],
        s2 = "select1,select2", [Measure 3]
    )

Capture5.JPG

 

Or 

Measure 4 = 
VAR s2 =
    CONCATENATEX (
        'Table (3)',
        'Table (3)'[selection],
        ","
    )
RETURN
    SWITCH (
        TRUE (),
        s2 = "select1", FORMAT([Measure],"General Number"),
        s2 = "select2", FORMAT([Measure 2],"General Number"),
        s2 = "select1,select2","select1:"&FORMAT([Measure],"General Number")&" ,"&"select2:"&FORMAT([Measure 2],"General Number")
    )

Capture6.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

What does [rTotaal Uren Probis Time] represent?  

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.