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
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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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