0
votes

I have the following problem applying dax in PowerBI:

DTAT column = Initinal Disposition Date - Document Date

For those cells in the Initial Disposition Date column that I don't have data, the calculation will certainly return negative values since all cells in Document Date column have values.

Is it possible to create a slicer based on the DTAT column where I can omit the negative values on the left hand side (but not delete them since that will change/remove other relevant data in my report)? Like not have it shown in the slicer but it's still there to slide?

I've got something like this to calculate the DTAT in Power BI:

DTAT column = IF( Initinal Disposition Date = blank(), blank(), Initinal Disposition Date - Document Date)

For some reason when I applied the function, there're still negative numbers in the slicer range.

Before-applying the range was: -43,000 to 324

After-applying the range was: -290 to 324

Does anyone have any ideas why the negative numbers still appear? (Even though there are no cells where the Document Date > Initial Disposition Date, except for those that are initially null that will become blank when applying the function).

Thank you so much! I'm new to PBI so any suggestions or ideas are highly appreciated!

enter image description here

2
Maybe because some of the Initinal Disposition Date values are zero? If you post a data sample, you will get better answers.RADO

2 Answers

0
votes

I would say that the negative values are right, because you are comparing Document Date behind and ahead the Initial Disposition Date.

If you only want the different between these 2 dates I would say to apply the following formula:

DTAT column = ABS(IF( Initinal Disposition Date = blank(), blank(), Initinal Disposition Date - Document Date))

If are not this the issue you are saying tell me please!

0
votes

For to the comment for my first answer, you can add a column that return the negative values as 0:

DTAT column(WithoutNegativeValues) = IF(DTAT column<0, 0, DTAT column)

Is this the result you want to obtain?