Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
fislar20
Contributor II
Contributor II

Count Function with an If Statement

I am trying to produce a result based on counting the times a certain result is produced within the pivot.

 

I have the following if statement:

 

if(if(minstring([_Invoice PO]='Invoice'),Sum( $(vTimePeriod_CurrentYear) [Volume (lbs) (Invoice)])-Sum( $(vTimePeriod_PreviousYear)
[Volume (lbs) (Invoice)]),Sum( $(vTimePeriod_CurrentYear) [Volume (lbs) (PO)])-Sum( $(vTimePeriod_PreviousYear) [Volume (lbs) (PO)]))<0,'Volume ▼'
,if(if(minstring([_Invoice PO]='Invoice'),Sum( $(vTimePeriod_CurrentYear) [Volume (lbs) (Invoice)])-Sum( $(vTimePeriod_PreviousYear) [Volume (lbs) (Invoice)])
,Sum( $(vTimePeriod_CurrentYear) [Volume (lbs) (PO)])-Sum( $(vTimePeriod_PreviousYear) [Volume (lbs) (PO)]))>0,'Volume ▲','Volume ↔'))

 

How would I write it to count the times  Volume ▲ is the result?

1 Reply
fislar20
Contributor II
Contributor II
Author

There has to be an expert out there that can help me with this?