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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
olivierschelstr
Regular Visitor

Create calculation table in PowerBI

Hi, 

 

Instead of having to calculate the table (see print screen) on the right side, I would like to have it in a table form in the PowerBI desktop itself. 

 

I will load the table untill column L and would like to calculate (based on dates) which orders were shipped too late and which ones were on time, both for

- required vs confirmed date

- required vs loaded date

 

Small remark, I will not add the oclums I J K and L as they are not part of the actual output...

 

I'm struggling to make this table in PowerBI..

Thank you in advance,

 

olivierschelstr_0-1604905928291.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hello @olivierschelstr ,

Here are the steps you can follow:

1. Create the calculated column and measure, find out. If the order is shipped on time, if the order is delayed, days late

Column:

Req_VS_Conf_Column = IF('Table'[Req.Supplier Delivery Date]>='Table'[Product Ready Confirmation Date],"OK","Nok")

Req_VS_Load_Column = IF('Table'[Req.Supplier Delivery Date]>='Table'[Loadingdate],"OK","NOK")

Measure:

days_late_Req_Ready = DATEDIFF(MIN('Table'[Req.Supplier Delivery Date]),MAX('Table'[Ready as from/at Ardo site]),DAY)

days_late_Req_Loading = DATEDIFF(MIN('Table'[Req.Supplier Delivery Date]),MAX('Table'[Loadingdate]),DAY)

Result:

v-yangliu-msft_0-1605000992539.png

2. Create a measure, find total orders, OK orders, NOK orders, service level, average days late.

Total Orders = COUNT('Table'[Req_VS_Conf_Column])

Req_Conf_Service_Level = DIVIDE(CALCULATE(COUNT('Table'[Req_VS_Conf_Column]),FILTER('Table','Table'[Req_VS_Conf_Column]="OK")),COUNTX(ALL('Table'),[Req_VS_Conf_Column]))

Req_conf_Average_days_late = SUMX(ALL('Table'),'Table'[days_late_Req_Ready])/COUNTX(ALL('Table'),'Table'[days_late_Req_Ready])

Req_Load_Service_Level = DIVIDE(CALCULATE(COUNT('Table'[Req_VS_Load_Column]),FILTER('Table','Table'[Req_VS_Load_Column]="OK")),COUNTX(ALL('Table'),[Req_VS_Load_Column]))

Req_Load_Average_days_late = SUMX(ALL('Table'),'Table'[days_late_Req_Loading])/COUNTX(ALL('Table'),'Table'[days_late_Req_Loading])

Result:

v-yangliu-msft_1-1605000992546.png

You can download the PBIX file from here.

Best regards

Liu Yang

If this post helps,then consider Accepting it as the solution to help other members find it faster.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hello @olivierschelstr ,

Here are the steps you can follow:

1. Create the calculated column and measure, find out. If the order is shipped on time, if the order is delayed, days late

Column:

Req_VS_Conf_Column = IF('Table'[Req.Supplier Delivery Date]>='Table'[Product Ready Confirmation Date],"OK","Nok")

Req_VS_Load_Column = IF('Table'[Req.Supplier Delivery Date]>='Table'[Loadingdate],"OK","NOK")

Measure:

days_late_Req_Ready = DATEDIFF(MIN('Table'[Req.Supplier Delivery Date]),MAX('Table'[Ready as from/at Ardo site]),DAY)

days_late_Req_Loading = DATEDIFF(MIN('Table'[Req.Supplier Delivery Date]),MAX('Table'[Loadingdate]),DAY)

Result:

v-yangliu-msft_0-1605000992539.png

2. Create a measure, find total orders, OK orders, NOK orders, service level, average days late.

Total Orders = COUNT('Table'[Req_VS_Conf_Column])

Req_Conf_Service_Level = DIVIDE(CALCULATE(COUNT('Table'[Req_VS_Conf_Column]),FILTER('Table','Table'[Req_VS_Conf_Column]="OK")),COUNTX(ALL('Table'),[Req_VS_Conf_Column]))

Req_conf_Average_days_late = SUMX(ALL('Table'),'Table'[days_late_Req_Ready])/COUNTX(ALL('Table'),'Table'[days_late_Req_Ready])

Req_Load_Service_Level = DIVIDE(CALCULATE(COUNT('Table'[Req_VS_Load_Column]),FILTER('Table','Table'[Req_VS_Load_Column]="OK")),COUNTX(ALL('Table'),[Req_VS_Load_Column]))

Req_Load_Average_days_late = SUMX(ALL('Table'),'Table'[days_late_Req_Loading])/COUNTX(ALL('Table'),'Table'[days_late_Req_Loading])

Result:

v-yangliu-msft_1-1605000992546.png

You can download the PBIX file from here.

Best regards

Liu Yang

If this post helps,then consider Accepting it as the solution to help other members find it faster.

amitchandak
Super User
Super User

@olivierschelstr , as you right side table is basically a split of the measure only. You need to have a calculated table for disply.

Example

union(
summarize("Measure","Share of Voice", "YTD",[Share of Voice YTD], "LYTD",[Share of Voice LYTD], "Change %",[Share of Voice %]),
summarize("Measure","SOV Rank", "YTD",[SOV Rank YTD], "LYTD",[SOV Rank LYTD], "Change %",[SOV Rank %])
)

 

I thought about, show on the row on Matrix. But that is for One column that can values like what shown

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.