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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
AKHIL_RB_123
Frequent Visitor

Problem for seperating datas from one column to different columns based on type of data (eg: units )

Hi community,

Im facing an issue for seperating the datas containing in one single column of a table having different units of measure to different columns corresponding to their units. Please help me to resolve this. 

Thanks in Advance.

1 ACCEPTED SOLUTION

Hi @AKHIL_RB_123 

Thanks for reaching out to us.

>> we need to create three mark cards with different calculations. 

For eg: Area - sum, Percentage - average, Base price - sum

Please try these measures,

Area-sum = CALCULATE(SUM(TableA[Measure value]),FILTER(ALL(TableA),TableA[Measures]="area"))
Percentage- average = AVERAGEX(FILTER(TableA,TableA[Measures]="Percentage Achieved"),[Measure value])
Base price-sum = CALCULATE(SUM(TableA[Measure value]),FILTER(TableA,TableA[Measures]="base price"))

 

result

vxiaotang_0-1662541896822.png

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@AKHIL_RB_123 , I there is another column that have uom, then you can use pivot table.

 

https://radacad.com/pivot-and-unpivot-with-power-bi

Otherwise, you have to write an if logic

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Hi,

Thanks for the reply.

 

Table A shows the dataset model where different measures have their own UOM we need to create three mark cards with different calculations. 

For eg: Area - sum, Percentage - average, Base price - sum

Table B shows the expected output combined with its UOM.

 

(NOTE: I already tried using IF condition but couldn't able to display the result. Kindly Help)

 

 

 

Table A

Measures

Measure value

UOM

area

100

Acre

area

265

Acre

area

300

Acre

area

45

Acre

area

56

Acre

area

23

Acre

Percentage  Achieved

25

%

Percentage  Achieved

50

%

Percentage  Achieved

36

%

Percentage  Achieved

56

%

Percentage  Achieved

70

%

base price

120

Rs.

base price

45

Rs.

base price

100

Rs.

base price

96

Rs.

base price

45

Rs.

base price

25

Rs.

 

 

Table B : Required output

 

Area :

789 Acre

Avg. Percentage  Achieved:

47.40%

base price:

431 Rs.

Hi @AKHIL_RB_123 

Thanks for reaching out to us.

>> we need to create three mark cards with different calculations. 

For eg: Area - sum, Percentage - average, Base price - sum

Please try these measures,

Area-sum = CALCULATE(SUM(TableA[Measure value]),FILTER(ALL(TableA),TableA[Measures]="area"))
Percentage- average = AVERAGEX(FILTER(TableA,TableA[Measures]="Percentage Achieved"),[Measure value])
Base price-sum = CALCULATE(SUM(TableA[Measure value]),FILTER(TableA,TableA[Measures]="base price"))

 

result

vxiaotang_0-1662541896822.png

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.