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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
cosminc
Post Partisan
Post Partisan

DAX expression - ignore dimension from graph

Hi,

i don't know how to obtain a graph like this:

 

Label          Result

B                count all Label=A && Value=1 in this case result is 1

C                count all Label=A && Value=1 in this case result is 1

D                count all Label=A && Value=1 in this case result is 1

the graph is filtered with B,C,D /// A is excluded

the slicer of year, month etc need to be functionally 

 

 

please take the base from below:

 

IDYearMonthClientLabelValue
120181cosminA1
120181cosminB1
120181cosminC1
120181cosminD0
220182cosminA0
220182cosminB1
220182cosminC1
220182cosminD0
320181anaA0
320181anaB0
320181anaC0
320181anaD1
420183anaA0
420183anaB1
420183anaC1
420183anaD1

 

 

thanks,

Cosmin

1 ACCEPTED SOLUTION
dax
Community Support
Community Support

Hi cosmic,

I am not clear about your requirement , did you mean that you won't want to show "A" in axis, and count label="A" and value =1  for B,C,D, right?

If so, you could try to use below measure to see whether it work or not(table 2 is for slicer which have only column have values A,B,C,D)

Measure =
VAR s =
    SELECTEDVALUE ( Table2[Column1] )
RETURN
    IF (
        s IN VALUES ( graph[Label] ),
        BLANK (),
        CALCULATE (
            COUNT ( graph[Label] ),
            FILTER ( ALL ( graph ), graph[Label] = "A" && graph[Value] = 1 )
        )
    )

Capture25.PNG

You need to set filter on measure to "is not blank"

If this is not what you want, please inform me your expecting output  by image or drawings


Best Regards,
Zoe Zhi

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
dax
Community Support
Community Support

Hi cosmic,

I am not clear about your requirement , did you mean that you won't want to show "A" in axis, and count label="A" and value =1  for B,C,D, right?

If so, you could try to use below measure to see whether it work or not(table 2 is for slicer which have only column have values A,B,C,D)

Measure =
VAR s =
    SELECTEDVALUE ( Table2[Column1] )
RETURN
    IF (
        s IN VALUES ( graph[Label] ),
        BLANK (),
        CALCULATE (
            COUNT ( graph[Label] ),
            FILTER ( ALL ( graph ), graph[Label] = "A" && graph[Value] = 1 )
        )
    )

Capture25.PNG

You need to set filter on measure to "is not blank"

If this is not what you want, please inform me your expecting output  by image or drawings


Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Thanks a lot!

Cosmin

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.