Forum Discussion
RE: Need percentage column
Hi All,
i want to calucalte the New column
1 .serviceorders/Service orders units (show in % two decimal)
2.Service orders+Service order units
3.Service orders-Service order units
i am new to PBI.
so how to add new measures (caluclated measures ) can anyone guide the steps to perform the above measures?
Note: i cannot see how to attach PBI file :(
Best
Chanty
Anonymous
Ok, so let's try this, where Table1 is the name of your table:
1. Create these two measures:
SUM_ServiceOrder($) = SUM(Table1[ServiceOrder($)])
SUM_ServiceOrderUnits = SUM(Table1[Service Order Units])
2. Using the two measures above, create the three measures you were asking for in your initial post:
a) serviceorders/Service orders units (show in % two decimal)
Measure1 = DIVIDE([SUM_ServiceOrder($)], [SUM_ServiceOrderUnits])
Under 'Modeling' you can set the format that you like (%, decimals etc)
b) Service orders+Service order units
Measure1 = [SUM_ServiceOrder($)] + [SUM_ServiceOrderUnits]
c) Service orders-Service order units
Measure1 = [SUM_ServiceOrder($)] - [SUM_ServiceOrderUnits]
3. Place the three newly created measures in values of the matrix visual, with Region and Country in rows of the matrix as you already had.
9 Replies
- AlB
Community Champion
Hi Anonymous
You have to upload the pbix somewhere else (Dropbox, OneDrive...) and share the URL here. Or upload the file to a site like tinyupload.com (no sign-up required)
Regarding your question. Do you need 1 or 3 calculated columns (since you mention 1. 2. 3.)?
Do you need measures or calculated columns, as you seem to be referring to both?
Cheers
- AnonymousNot applicable
Thanks for your Quick response.
i need 3 seperate columns for each measure.
- AlB
Community Champion
Anonymous
To be able to help, I would need you to share the pbix or otherwise explain what 'serviceorders' and 'Service orders units' are.
Are they measures?
If so please show the code.
If not, how did you build the visual you are showing? Are the columns you show for 'serviceorders' and 'Service orders units' the Sum of those fields?Some other operation?
It would also help if you show the structure of the table(s) in your data model.
If you can share the pbix that's the easiest/quickest.