Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello to all,
I would like to make weekly and monthly averages of train punctuality in percentage.
Excel does it very well (screen view in pj) but I think it should be possible to do it in power bi desktop.
Every weekend I want power bi to divide the total number of non-punctual trains by the total number of trains to feed a percentage gauge.
I have tried different DAX formulas and measurements but I can't get it right. Would you have a formula to do this calculation?
thank you
Solved! Go to Solution.
Hi, @Anonymous
Thank you for your posting, and I want to share how I proceed.
1. create custom-date table -> assign as a date table
2. create a relationship with Data table
3. Write the below three measures to calculate the percentage.
4. please check the picture if it is what you are looking for.
please also check the link down below, that is the sample pbix file

Hi, @Anonymous
Thank you for your posting, and I want to share how I proceed.
1. create custom-date table -> assign as a date table
2. create a relationship with Data table
3. Write the below three measures to calculate the percentage.
4. please check the picture if it is what you are looking for.
please also check the link down below, that is the sample pbix file

Hi @Anonymous ,
You can use a DAX something like below:
If you want to create a column then use below and chnage the datatype to percentage:
calc = DIVIDE([Total number of non punctual trains], [Total number of trains], 0)
If you want to create a measure, then use the following:
calc = DIVIDE(SUM([Total number of non punctual trains]), SUM([Total number of trains]), 0)
Just use your original columns and tablename in the above dax calculations.
Thanks,
Pragati
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 37 | |
| 35 | |
| 34 | |
| 27 |
| User | Count |
|---|---|
| 134 | |
| 101 | |
| 71 | |
| 67 | |
| 65 |