Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi! I numeric value that comes in every day and my table looks like
Header 1 | Header 2 |
---|---|
20170101 | 1239993 |
20170102 | 1268323 |
20170103 | 1234343 |
and I want to write a expression for a pie chart that only brings in the last day's value.
how do I do this??
Thank you in advance!!
May be like this:
Assuming Header 1 is a number and not date
Sum({<[Header 1] = {"$(=Max([Header 1]))"}>}[Header 2])
or
Assuming Header 1 is a date and not number
Sum({<[Header 1] = {"$(=Date(Max([Header 1]), 'YYYYMMDD'))"}>}[Header 2])
May be like this:
Assuming Header 1 is a number and not date
Sum({<[Header 1] = {"$(=Max([Header 1]))"}>}[Header 2])
or
Assuming Header 1 is a date and not number
Sum({<[Header 1] = {"$(=Date(Max([Header 1]), 'YYYYMMDD'))"}>}[Header 2])
Hi!
This works perfectly !! just one more question. can I add one more if statement within the sum?? for example [Header 3] = 'Y' ?
Thank you so much!
Sure, may be like this:
Sum({<[Header 1] = {"$(=Max([Header 1]))"}, [Header 3] = {'Y'}>}[Header 2])
or
Sum({<[Header 1] = {"$(=Date(Max([Header 1]), 'YYYYMMDD'))"}, [Header 3] = {'Y'}>}[Header 2])
AMAZING!!! Thank you