Forum Discussion
Dimension in Bar Chart
Hi,
I'm trying to reach the following objective:
Table 1
| Date | region | count |
| 01/11/2018 | region1 | 100 |
| 01/11/2018 | region2 | 20 |
| 01/11/2018 | region3 | 30 |
| 01/11/2018 | region4 | 15 |
| 01/11/2018 | region5 | 20 |
| 01/12/2018 | region1 | 40 |
| 01/12/2018 | region2 | 50 |
| 01/12/2018 | region3 | 20 |
| 01/12/2018 | region4 | 30 |
| 01/12/2018 | region5 | 60 |
The table2 is a calendar table.
create a bar chart for a specific month but only 4 regions in the dimension, which are region1, region2, region3&4 and region5. So only one bar for the combined region 3 and 4.
Thanks for the help!
Anonymous , You have create a new column like
New Region =
switch(true() ,
[region] in {"Region 3", "Region 4"} , "Region 3 & 4",
[region]
)
3 Replies
- amitchandakSuper User
Anonymous , You have create a new column like
New Region =
switch(true() ,
[region] in {"Region 3", "Region 4"} , "Region 3 & 4",
[region]
)
- AnonymousNot applicable
Got it, it works perfectly!
Many thanks
- AnonymousNot applicable
Here is the dax for the previous month calculation. How to incorporate your proposal for the dimension?
Total last Month =
CALCULATE (
SUM ( table[total] ),
table[region] IN { 1, 2, 3, 4, 5 },
DATESBETWEEN (
'Date'[Date],
EOMONTH ( TODAY (), -2 ) + 1,
EOMONTH ( TODAY (), -1 )
)
)