Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I have a table containing 2 date columns:
What I want in my visual is the count of Created and Updated by month in the same graph like this:
I can't figure out how to have a common date value for the 2 measures. I guess I need to create a DAX table but I've failed to have the expected result so far. My aggregated data should look like this:
Regards
Solved! Go to Solution.
Hi @Anonymous,
You need to create a calendar table check the links below for a DAX and a M code option (just two examples).
DAX - https://powerbi.tips/2017/11/creating-a-dax-calendar/
M (Query editor) - https://powerpivotpro.com/2015/02/create-a-custom-calendar-in-power-query/
Then create an inactive relationship between your calendar table and your two columns and add the following measures:
Created count = CALCULATE(COUNT(DatesLog[Created on]);USERELATIONSHIP(DatesLog[Created on];DimDate[Date])) Updated count = CALCULATE(COUNT(DatesLog[Updated on]);USERELATIONSHIP(DatesLog[Updated on];DimDate[Date]))
Add the month from the dates table on your x-axis and the measures on your values, this will give you the result below:
Regards
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Anonymous,
You need to create a calendar table check the links below for a DAX and a M code option (just two examples).
DAX - https://powerbi.tips/2017/11/creating-a-dax-calendar/
M (Query editor) - https://powerpivotpro.com/2015/02/create-a-custom-calendar-in-power-query/
Then create an inactive relationship between your calendar table and your two columns and add the following measures:
Created count = CALCULATE(COUNT(DatesLog[Created on]);USERELATIONSHIP(DatesLog[Created on];DimDate[Date])) Updated count = CALCULATE(COUNT(DatesLog[Updated on]);USERELATIONSHIP(DatesLog[Updated on];DimDate[Date]))
Add the month from the dates table on your x-axis and the measures on your values, this will give you the result below:
Regards
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsWorks perfectly, thanks!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |