6 Replies Latest reply on Jan 15, 2018 11:27 AM by Teju pamarty

# Percent Reduction in a Measure over time

Hi Guys,

I have a data set that has a list of unique ID's that are assigned to a seller. I am trying to calculate a percentage difference from the overall count of seller ID's to the current count today. I have converted the Seller ID's to a measure to get a distinct count and then I have created a calculated field to separate the ID field into two measures essentially. The calculated field is as follows:

IF [Date]=TODAY() THEN [Seller Id] END

When I try to calculate the percentage difference between the two it will not allow this because they are string values, but upon changing the data type to a whole number I get 0 or nothing back. I have also tried turning them into integers in the calculation with no luck:

INT([Sellers])-INT([Seller Count (Current)])/INT([Sellers])

Any help would be greatly appreciated!

Thanks

• ###### 1. Re: Percent Reduction in a Measure over time

HI Alex

Could you please attach packaged workbook.

Thanks,

Shin

• ###### 2. Re: Percent Reduction in a Measure over time

Yes, see attached!

• ###### 3. Re: Percent Reduction in a Measure over time

Hi Alex

I am not quite sure but does this help?

Thanks,

Shin

• ###### 4. Re: Percent Reduction in a Measure over time

Unfortunately no, I am trying to see overall count difference with current (today) so I am using a calculation:

IF [Date]=TODAY() THEN [Seller Id]

END

This will not allow me to do a calculation in this way

• ###### 5. Re: Percent Reduction in a Measure over time

I am unable to use the quick table calculations in the same way you are.

• ###### 6. Re: Percent Reduction in a Measure over time

Hi alex.zapherson , this can be done using LOD.

1) Create a calculated field similar to this : {COUNT([Seller ID])} to get the total count of seller ID irrespective of the view.

2) Now, to get the count of seller ID for current date create a calculated field similar to this :

COUNTD (IF [Date]=TODAY() THEN [Seller ID]

END)

3) Now for the last part calculate the percentage of diff by using ((MAX([count of seller ID])-[Seller ID (Current)])/MAX([count of seller ID]))*100

The "% Diff " calculated field should give you the required result. I'm attaching a workbook too. Let me know if this helped.