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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
danyal1990
Regular Visitor

Split Dimension in Bar Chart and Show Combined Calculated Values

Hi All,

 

Is there any way in DAX to split values and show them as calculated? as I don't want to change in my Data Model.

 

Please guide.

 

Problem:

danyal1990_0-1648805282606.png

 

Requirement:

danyal1990_1-1648805461125.png

Regards

1 ACCEPTED SOLUTION
v-cazheng-msft
Community Support
Community Support

Hi @danyal1990 ,

 

Not sure about how you would like to split the rows “Value-2:Value-1”, so I do it by random. You may need do a little change to the following DAX formula to fulfill your needs.

Here are the sample data used.

vcazhengmsft_0-1649163057402.png

 

Create a Calculated column to complete the split.

Split =
VAR rows_need_split =
    CALCULATE (
        COUNT ( 'Table'[Response] ),
        CONTAINSSTRING ( 'Table'[Response], ":" )
    )
VAR mid_ =
    RAND()* rows_need_split
VAR half = rows_need_split / 2
VAR res =
    IF (
        mid_ > 0
            && mid_ <= half,
        LEFT ( 'Table'[Response], 7 ),
        MID ( 'Table'[Response], 9, 8 )
    )
RETURN
    IF ( CONTAINSSTRING ( 'Table'[Response], ":" ), res, 'Table'[Response] )

 

And use the Calculated column above to create the visual. The result will look like this.

vcazhengmsft_1-1649163057404.png

 

vcazhengmsft_2-1649163057407.png

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!

 

Best Regards,

Community Support Team _ Caiyun

View solution in original post

5 REPLIES 5
v-cazheng-msft
Community Support
Community Support

Hi @danyal1990 ,

 

Not sure about how you would like to split the rows “Value-2:Value-1”, so I do it by random. You may need do a little change to the following DAX formula to fulfill your needs.

Here are the sample data used.

vcazhengmsft_0-1649163057402.png

 

Create a Calculated column to complete the split.

Split =
VAR rows_need_split =
    CALCULATE (
        COUNT ( 'Table'[Response] ),
        CONTAINSSTRING ( 'Table'[Response], ":" )
    )
VAR mid_ =
    RAND()* rows_need_split
VAR half = rows_need_split / 2
VAR res =
    IF (
        mid_ > 0
            && mid_ <= half,
        LEFT ( 'Table'[Response], 7 ),
        MID ( 'Table'[Response], 9, 8 )
    )
RETURN
    IF ( CONTAINSSTRING ( 'Table'[Response], ":" ), res, 'Table'[Response] )

 

And use the Calculated column above to create the visual. The result will look like this.

vcazhengmsft_1-1649163057404.png

 

vcazhengmsft_2-1649163057407.png

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!

 

Best Regards,

Community Support Team _ Caiyun

tamerj1
Super User
Super User

Manage it based on what? There must be some criteria 

Yes, I just want to split the Response and want DAX to calculate the Responses as shown in picture.

I just edited the picture on my own not done any calculation.

Should we need to do a Group By or anything else? guide please
Thanks

 

tamerj1
Super User
Super User

Hi @danyal1990 
Is this a simple count? How did you know that 2 goes for Value2 and 1 goes for Value1?

Hi tamerj1,


Yes, currently it is simple count of the response.

 

If we split this response through DAX then it will automatically manage it or we need to change it? 

 

danyal1990_0-1648825059004.png

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.