Forum Discussion
KevinOGC
7 years agoFrequent Visitor
Saving measure value into table
Hi everyone,
I have a table 'advertisements' which looks like below:
| id | is_online |
| 1 | true |
| 2 | false |
| 3 | false |
| 4 | true |
| 5 | true |
| 6 | false |
I want to count the unique id where online is true, so I made the DAX like below:
Online Ads = CALCULATE(
DISTINCTCOUNT(Advertisements[id]);
FILTER (Advertisements;Advertisements[is_online]=True))
Now the is_online status changes over time and I want to save this measure in a table on a daily basis (at a specific moment) which should look like:
| date | is_online |
| 1/1/2019 | 2 |
| 1/2/2019 | 6 |
| 1/3/2019 | 2 |
| 1/4/2019 | 4 |
| 1/5/2019 | 1 |
| 1/6/2019 | 4 |
How can I achieve this?
2 Replies
- v-chuncz-msft
Community Support
You may refer to the following posts.
- KevinOGCFrequent Visitor
v-chuncz-msft thanks a lot for your answer!
There is no colum/table with the is_online date, so I need to count the is_online daily and save it to somewhere. All the given examples using an available date.
Are there options without a date is_online relation?