Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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
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
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
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
User | Count |
---|---|
126 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |