Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Calculated Column Resulting in Duplicates

I have a calculated measure to figure out the availability percent. I am now trying to take it a step forward and created a calculated column to see if the available hours for an employee is more than 0 = Available and if the available hours is less than 0 = Not Available. I want to use the calculated column in the legend since a calculated measure is not possible (as far as I know). This is the calculated column I created:

 

Available vs. Not Available = IF('fact AvailableTime'[Available Hours]>0,"Available","Not Available")
 
Available hours is calculated by taking the diary time - scheduled hours in this case. The availability percent is the available hours/diary time.
 
Any tips or something I may be missing with the calculated column to explain why it is duplicating/how to adjust so the individual result shows an employee and if their available hours is greater than 0 then tag them as available and if less than 0 tag them as not available. I want to be able to see the available vs. not available calculated column as a legend in a stacked bar graph.
 
 
Thanks!
 
 

 

 

1 Reply

  • Hi Anonymous ,

     

    Are the calculations for the available hours a measure or a column on your data?

     

    If it's a measure then you will get the incorrect values.

     

    Regarding the question about the use of measures has legend on your calculation you can do it but you have to do a disconnected table and the use of a switch function. How do you want to setup the chart for available not availabe what are the values you will be presenting?

     

    Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.

    If the information is sensitive please share it trough private message.