Forum Discussion
I'm stumped on analyzing data by date
- Anonymous5 years ago
Hi ChrisNelsonPE ,
For a bar chart, you try the measures.
Measure = CALCULATE(DISTINCTCOUNT('Table'[Visitor]),FILTER('Table',[VisitedOn]=MAX('Table'[VisitedOn])))Just use FILTER function to filter the dates which you want. MAX corresponds to the latest date, and MIN corresponds to the earliest date.
New sample pbix file is here.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks, Anonymous . The forum software ate my original question and kept me from editing or replying to the topic for days. I started over at https://community.powerbi.com/t5/Desktop/I-m-stumped-on-analyzing-data-by-date/m-p/1529242/highlight/false#M628567 which I think has clear inputs and outputs.
Hi ChrisNelsonPE ,
For the first expected result, put the VisitedOn column and the Visitor column to a table. Then select Count(Distinct) in the Visitor column as follows.
For the second expected result, put the VisitedOn column and the Visitor column to a table. Then select Lateset in the VisitedOn column as follows.
You can check more details from here.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- ChrisNelsonPE5 years ago
Helper I
Anonymous, thanks, that does produce the correct results. But I need charts, not tables. I tried to create a bar chart with the same process but some of the options aren't there.
- Anonymous5 years agoNot applicable
Hi ChrisNelsonPE ,
For a bar chart, you try the measures.
Measure = CALCULATE(DISTINCTCOUNT('Table'[Visitor]),FILTER('Table',[VisitedOn]=MAX('Table'[VisitedOn])))Just use FILTER function to filter the dates which you want. MAX corresponds to the latest date, and MIN corresponds to the earliest date.
New sample pbix file is here.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.