Forum Discussion
Clusterd bar chart using 2 x-axis columns
- 8 years ago
Hi OskariNi,
Make a Dimension table with Week and then make the relatioship between this table and the Open and Close date be aware that for this two relationships you need to make inactive relationships.
Then create two measures like this:
Opened = CALCULATE ( COUNT(Table[Open Week]); USERELATIONSHIP(Table[Open Week]; Week[Week]) Closed= CALCULATE ( COUNT(Table[Closed Week]); USERELATIONSHIP(Table[Closed Week]; Week[Week])
Then create your chart using the table from the week column in the axis and both measures on values.
Be aware that your week table probably should be YearWeek and not only week.
Regards,
MFelix
- 8 years ago
Hi OskariNi,
One best practice is to create a Dimension table for Dates making use of all the hierarchies trhough that table, this is applicable when you have several tables or fields within the same table that you need to connect by date field.
Check this example or search for DimDate / Calendar in Power BI models, you will get several examples then you just need to implement the solution I have refer.
Regards,
MFelix
Hi MFelix
The hierarchies (date and type) are in the same table (small part of the table in the first post). I can't share my pbix but perhaps I can generate a similar sample data for you.
Hi OskariNi,
One best practice is to create a Dimension table for Dates making use of all the hierarchies trhough that table, this is applicable when you have several tables or fields within the same table that you need to connect by date field.
Check this example or search for DimDate / Calendar in Power BI models, you will get several examples then you just need to implement the solution I have refer.
Regards,
MFelix