Forum Discussion
Need help- Adding more condition
Hello all,
Greeting.
What should I do to show the different targets in the same visual? Currently, this graph showing the Met Max Target result only
Criteria :
1 - Met Min Target ( total staff count )
2 - Met Max Target ( total staff count )
How should I improve the DAX code to include Met Min Target into the graph visual? Thanks for helping.
DAX code
Utilization =
ADDCOLUMNS(
SUMMARIZE(
'Effort',
'Effort'[Month],Effort[StaffName],Effort[Location],
"Total Effort Hours",SUM('Effort'[EffortTime])
),
"MetMaxTarget",IF(CALCULATE(MAX('ManTotalHR'[MaxEffort]),ManTotalHR[Date]=EARLIER(Effort[Month])) <= [Total Effort Hours],1,0),
Currently, I have 2 Table to compare the results
Effort table
| Staff | Month | Week | Total Working Hours |
| A | Jan | 1 | 40 |
| A | Jan | 2 | 35 |
| A | Jan | 3 | 37 |
| A | Jan | 4 | 40 |
| A | Jan | 5 | 30 |
| B | Jan | 1 | 38 |
| B | Jan | 2 | 39 |
| B | Jan | 3 | 40 |
| B | Jan | 4 | 30 |
| B | Jan | 5 | 30 |
| C | Jan | 1 | 40 |
| C | Jan | 2 | 40 |
| C | Jan | 3 | 40 |
| C | Jan | 4 | 40 |
| C | Jan | 5 | 30 |
| A | Feb | 1 | 35 |
| A | Feb | 2 | 40 |
| A | Feb | 3 | 40 |
| A | Feb | 4 | 30 |
| B | Feb | 1 | 40 |
| B | Feb | 2 | 35 |
| B | Feb | 3 | 30 |
| B | Feb | 4 | 25 |
| C | Feb | 1 | 30 |
| C | Feb | 2 | 30 |
| C | Feb | 3 | 32 |
| C | Feb | 4 | 35 |
ManTotalHR Table
| Month | Max Target | Min Target |
| Jan | 180 | 160 |
| Feb | 130 | 110 |
2 Replies
- Greg_DecklerCommunity Champion
Try a Clusered Column and Line chart visual. Experiment with setting the Stroke width for the line to 0.
- AnonymousNot applicable
Thanks, Greg_Deckler for your reply.
Before that I struggle with DAX code, anyway I found the solution already.