Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 Task | Shortage |
1 | No Shortage |
2 | No Shortage |
3 | Other |
4 | Other |
5 | Full |
6 | Other |
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:
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!!
Solved! Go to Solution.
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 () )
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 () )
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
96 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
88 | |
63 |