Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I would like to load several files in one chart to compare the sum of [Wert frei verwend.] with each month.
(not the total sum but the sum of month's end)
I already tried
- vCurrentMonth =Month(Today())
sum({<month={'$(vCurrentMonth)'}>}[Wert frei verwend.])
- vPreviousMonth =Month(Today()-31)
sum({<month={'$(vPreviousMonth)'}>}[Wert frei verwend.])
but it doesn’t work.
LOAD Material,
Materialkurztext,
Werk,
LOrt,
BME,
[Frei verwendbar],
[In QualPrüfung],
Gesperrt,
Retouren,
[Wert frei verwend.],
Transitbestand,
[Wert in QualPrüfng],
[Wert Sperrbestand],
date(Date#(Left(FileBaseName(), 10), 'YYYY-MM-DD')) As FileDate
FROM [……2013-**-**.csv]
I appreciate your time and help!
HI
Edit:
For today or max date
= sum({<FileDate = {"$(=Today())"}>}[Wert frei verwend.])
or
= sum({<FileDate = {"$(=max(FileDate))"}>}[Wert frei verwend.])
HI
Try like this
For this month
= sum({<FileDate = {">=$(=MonthStart(Today()))<= $(=MonthEnd(Today()))"}>}>}[Wert frei verwend.])
For previous month
= sum({<FileDate = {">=$(=MonthStart(AddMonths(Today(),-1)))<= $(=MonthEnd(AddMonths(Today(),-1)))"}>}>}[Wert frei verwend.])
Hope it helps
Thank you for your help but it doesn't work. My chart showes nothing.
Is it possible that there is a mistake in the skript?
HI
Its my default, try like this
For this month
= sum({<FileDate = {">=$(=MonthStart(Today()))<= $(=MonthEnd(Today()))"}>}[Wert frei verwend.])
For previous month
= sum({<FileDate = {">=$(=MonthStart(AddMonths(Today(),-1)))<= $(=MonthEnd(AddMonths(Today(),-1)))"}>}[Wert frei verwend.])
It works!
Now it showes the sum of the whole month (01.08.-31.08.) but I need the sum of the last existing file of the month(31.08)
Is it possible?
Hi
Are you need the last date of the month? if so, try like this
= sum({<FileDate = {"$(=MonthEnd(Today()))"}>}[Wert frei verwend.])
Okay thank you:)
is it also possible to load the latest file?
For example 29.8 (current day) and not the 31.08?
HI
Edit:
For today or max date
= sum({<FileDate = {"$(=Today())"}>}[Wert frei verwend.])
or
= sum({<FileDate = {"$(=max(FileDate))"}>}[Wert frei verwend.])
Thanks a lot!
Hi Olly_DD1
Please close this post, its helps other