Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Dimension in Bar Chart

Hi,

I'm trying to reach the following objective:

Table 1

Dateregioncount
01/11/2018region1100
01/11/2018region220
01/11/2018region330
01/11/2018region415
01/11/2018region520
01/12/2018region140
01/12/2018region250
01/12/2018region320
01/12/2018region430
01/12/2018region560

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

  • Anonymous , You have create a new column like

     

    New Region  =

    switch(true() ,

    [region] in {"Region 3", "Region 4"} , "Region 3 & 4",

    [region]

    )

    • Anonymous's avatar
      Anonymous
      Not applicable

      Got it, it works perfectly!

       

      Many thanks

  • Anonymous's avatar
    Anonymous
    Not 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 )
    )
    )