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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

0

measure to calculate multiple columns

Hi ,

I have 4 columns with A,B,C,D and i have filters with A,B,C,D Have to create a column or measure with sum(A),count(B),Count(C),Count(D) the output have to display only that value when i click on filters For example if i select A it should display only A value and if  i selecton B  it should display only B values.

 

Thanks,

Javed

Status: Delivered
Comments
v-yuezhe-msft
Employee

@JAVED,

I make a test in the following sample table.
1.PNG

Firstly, create a new table as below.
2.PNG

Secondly, create the following measures in the Table1.

SUMA = SUM(Table1[A])
COUNTB = COUNT(Table1[B])
COUNTC = COUNT(Table1[C])
COUNTD = COUNT(Table1[D])
Measure = IF(SELECTEDVALUE(Table2[Column1],"")="A",[SUMA],IF(SELECTEDVALUE(Table2[Column1],"")="B",[COUNTB],IF(SELECTEDVALUE(Table2[Column1],"")="C",[COUNTC],[COUNTD])))


After the above steps, you can create slicer as below.
1.PNG

If you don't get expected result using above steps, please share sample data of your table here and share desired result based on the sample data.

Regards,
Lydia

v-yuezhe-msft
Employee
Status changed to: Delivered
 
JAVED
Helper I

Thanks for the reply @v-yuezhe-msft

But if i don't select anything it should display all but by this it is not showing

v-yuezhe-msft
Employee

@JAVED,

What do you mean that " display all when you don't select anything"? Could you please share sample data of your tables and post expected result here?

Regards,
Lydia