Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 216485

filter context if function

$
0
0

I defined the following measure on a filtered context which is enabled by a slicer. This archieved the desired result, i.e. the measure gives the right value and only for the records I selected by the slicer.

 

Measure =
VAR
Sales = SUMX(SALES_90_DAYS;SALES_90_DAYS[SALES_AMT_90_DAYS])
VAR
DSO = (SUMX(DTM_AR_OPEN_BALANCE_HIST; DTM_AR_OPEN_BALANCE_HIST[AMT_REMAINING_LINES_SOB])/Sales)*90

RETURN
DSO

 

As an improvement of this measure I would like to replace the returned DSO with another value for specific situations of Sales. I did several tries but with no succes. All the tries I did (like the one ahead), calculated the metric well for the records selected by the slicer but the problem is that the filter of the slicer get enabled, i.e. all records are visible in the table instead of only the records I selected by the slicer.

 

How can I resolve this?

 

Measure =
VAR
Sales = SUMX(SALES_90_DAYS;SALES_90_DAYS[SALES_AMT_90_DAYS])
VAR
DSO = (SUMX(DTM_AR_OPEN_BALANCE_HIST; DTM_AR_OPEN_BALANCE_HIST[AMT_REMAINING_LINES_SOB])/Sales)*90

RETURN
 IF (DSO<200; 'Good';'Bad)

 

 


Viewing all articles
Browse latest Browse all 216485

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>