Hello,
I want to create a bar chart that presents the count of records having a given date in two separate date fields (Date1 and Date2) with a date x-axis. I also need to be able to filter by country and/or region.
Here is a sample dataset and desired chart:
Country | Region | Date1 | Date2 |
Canada | Americas | 31-Oct-18 | 31-Oct-18 |
USA | Americas | 31-Oct-18 | 31-Dec-18 |
China | Asia Pacific | 30-Jun-18 | 31-Jul-18 |
India | Asia Pacific | 30-Sep-18 | 30-Sep-18 |
France | Europe | 30-Sep-18 | 31-Oct-18 |
Germany | Europe | 31-Jul-18 | 30-Nov-18 |
Spain | Europe | 30-Nov-18 | 31-Dec-18 |
Australia | Asia Pacific | 31-Aug-18 | 30-Sep-18 |
Researched and tried various things without success 😞
Thank you!
Solved! Go to Solution.
Hi huguest,
Click edit queries-> Transform-> click on column Date1 and Date2-> click Unpivot Columns, the result is like below:
Then you can drag country column to value field, Date column as x-axis, legend column as legend.
Regards,
Jimmy Tao
I'm not super clear on what you are going for here but perhaps it is similar to one of these two Quick Measures?
https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/m-p/409364
https://community.powerbi.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/409365
Proud to be a Datanaut!
Just do some pivoting in Power Query so you've got four columns - country, region, date type and date, then make a couple of measures counting the instances of 1 and 2 in your date type column
Hi huguest,
Click edit queries-> Transform-> click on column Date1 and Date2-> click Unpivot Columns, the result is like below:
Then you can drag country column to value field, Date column as x-axis, legend column as legend.
Regards,
Jimmy Tao
User | Count |
---|---|
127 | |
79 | |
77 | |
71 | |
69 |
User | Count |
---|---|
125 | |
74 | |
67 | |
59 | |
53 |