cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
JAVED Regular Visitor
Regular Visitor

combine columns

i have 4 columns with A,B,C,D

Have to create another column or measure with sum(A),count(B),Count(C),Count(D)

1 ACCEPTED SOLUTION

Accepted Solutions
jd009 Member
Member

Re: combine columns

As you've stated you need Count in your measure, substitute v-qiuyu-msft's solution with Count

 

Measure = SUM(Table1[A])& "," & COUNT(Table1[B])&"," & COUNT(Table1[C]) &"," &  COUNT(Table1[D])

View solution in original post

4 REPLIES 4
Moderator v-qiuyu-msft
Moderator

Re: combine columns

Hi @JAVED,

 

You can create a measure below: 

Measure = SUM(Table1[A])& "," & SUM(Table1[B])&"," & SUM(Table1[C]) &"," &  sum(Table1[D])

 

w1.PNGw2.PNG

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jd009 Member
Member

Re: combine columns

As you've stated you need Count in your measure, substitute v-qiuyu-msft's solution with Count

 

Measure = SUM(Table1[A])& "," & COUNT(Table1[B])&"," & COUNT(Table1[C]) &"," &  COUNT(Table1[D])

View solution in original post

JAVED Regular Visitor
Regular Visitor

Re: combine columns

But i have filters with A,B,C,D the output have to display only that value when i click on filters For example if i click on A it should display only A value

jd009 Member
Member

Re: combine columns

Sounds like you need to unpivot the A,B,C & D columns in the table in Power Query and that will give you a single column for the values of A,B,C & D and also another column that attributes A,B,C or D to the value.

 

You would then be looking at a formula like this:

Measure = CALCULATE(SUM(Table1[Values], Table1[Attributes] = "A")) &","& CALCULATE(COUNT(Table1[Values], Table1[Attributes] = "B")) &","& CALCULATE(COUNT(Table1[Values], Table1[Attributes] = "C")) &","& CALCULATE(COUNT(Table1[Values], Table1[Attributes] = "D")

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 120 members 1,311 guests
Please welcome our newest community members: