Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

DAX Solution to select a date from slicer and needed summation of sales till next 7 days from selected date.

$
0
0

I tried This i)

Test2:=CALCULATE(IF(HASONEFILTER(Sheet1[Date]),
CALCULATE(SUM(Sheet1[Sales]),FILTER(RELATEDTABLE(Sheet1),DATESBETWEEN(Sheet1[Date],FIRSTDATE(Sheet1[Date]),LASTDATE(DATE(YEAR(Sheet1[Date]),Month(Sheet1[Date]),DAY(Sheet1[Date])))))),0))

This ii)

Test3:=IF(HASONEFILTER(Sheet1[Date]),SUMX(FILTER(
Sheet1,
Sheet1[Date]>=Sheet1[Date]+7 && Sheet1[Date]<=Sheet1[Date]
),Sheet1[Sales]),0)

And This iii)

Test4:=CALCULATE(
IF(
HASONEFILTER(Sheet1[Date]),
Sumx(
FILTER(
RELATEDTABLE(Sheet1),
DATESBETWEEN(
Sheet1[Date],
FIRSTDATE(Sheet1[Date]),
LASTDATE(DATE(
YEAR(Sheet1[Date]),
Month(Sheet1[Date]),
DAY(Sheet1[Date])
)
)
)
)
,Sheet1[Sales]),
0
)
)

All my Queries giving values with-ought summing Sales quantity, keeping filters in place.

Appreciate any lead or help on the same.

 


Viewing all articles
Browse latest Browse all 72043

Trending Articles



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