Forum Discussion
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.
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
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.
3 Replies
- amitchandakSuper 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.- AKHIL_RB_123Frequent Visitor
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.
- v-xiaotangCommunity Support
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
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.