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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Rate
Helper III
Helper III

Grouped Chart with Measure with Calculate as Value.

Hello!

I am struggling with something I can't quite understand, and I am going sort of nuts.

 

I have a Data Table, no relations whatsoever, where I have a line for each Task our workforce is doing. They are sending information on the visits to stores, and checking if there is a Stock Shortage (or not) and the reason behind the shortage when there is.

 

I am trying to show a simple column chart with the following data:

- Values: A measure, where I guess my problem is coming from: 

Visit with Shortage =
CALCULATE(
        DISTINCTCOUNT(Task[ID Task]);
        Task[Shortage] <> "No Shortage")

- Axis: The column "Shortage", where there are text values, one per line, with the detail for the shortage or, if there is no shortage, the text "No Shortage".

 

As an example, the table I am testing with is this:

ID TaskShortage
1No Shortage
2No Shortage
3Other
4Other
5Full
6Other

 

I would want a chart with the count of tasks with the type of shortage, but not the column with "No Shortage". The graph I am obtaining is this one:Screenshot_1.png

 

 

I know that I could simply add a filter to the chart, but I am more interested in learning the reason why this is not working as I intend.

 

Thanks a lot!!

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

Hi @Rate ,

 

To update your measure as below.

 

Visit with Shortage = 
VAR st =
    MAX ( 'Task'[Shortage] )
RETURN
    IF ( st <> "No Shortage", DISTINCTCOUNT ( Task[ID Task] ), BLANK () )

Capture.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

3 REPLIES 3
v-frfei-msft
Community Support
Community Support

Hi @Rate ,

 

To update your measure as below.

 

Visit with Shortage = 
VAR st =
    MAX ( 'Task'[Shortage] )
RETURN
    IF ( st <> "No Shortage", DISTINCTCOUNT ( Task[ID Task] ), BLANK () )

Capture.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Hello @v-frfei-msft ,

 

That worked like a charm! Thank you so much!

 

Regards!

RobbeVL
Impactful Individual
Impactful Individual

Hi,

 

Your calculation actually doesnt make much sense.

You are trying to filter your measure, while you actually need to filter your axis.

 

You could create a more "complex" measure to filter out no shortage, but filtering your visual or dataset would make alot more sense.

 

Robbe

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors