Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

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! 

GuyA_0-1617103122001.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , You have create a new column like

 

New Region  =

switch(true() ,

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

[region]

)

View solution in original post

3 REPLIES 3
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 )
)
)

amitchandak
Super User
Super User

@Anonymous , You have create a new column like

 

New Region  =

switch(true() ,

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

[region]

)

Anonymous
Not applicable

Got it, it works perfectly!

 

Many thanks

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.