Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

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

StaffMonthWeekTotal Working Hours
AJan140
AJan235
AJan337
AJan440
AJan530
BJan138
BJan239
BJan340
BJan430
BJan530
CJan140
CJan240
CJan340
CJan440
CJan530
AFeb135
AFeb240
AFeb340
AFeb430
BFeb140
BFeb235
BFeb330
BFeb425
CFeb130
CFeb230
CFeb332
CFeb435

 

ManTotalHR Table 

MonthMax TargetMin Target
Jan180160
Feb130110

 

2 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Try a Clusered Column and Line chart visual. Experiment with setting the Stroke width for the line to 0.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks, Greg_Deckler  for your reply.

      Before that I struggle with DAX code, anyway I found the solution already.