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
I have a table with a lot of orders with their respective Estimated shipping dates and actual delivery dates and today I have a report that shows which orders are shipped on time (or before). Below is the calculated formula I have for this
Solved! Go to Solution.
Hi @vipett ,
You will need to create a table contains 2, 5 and 7 as a column then use this column as slicer.
Using selectedvalue() function could get the selected slicer value.
https://docs.microsoft.com/en-us/dax/selectedvalue-function .
At last modify the formula change "+2" to "+selectedvalue('slicer'[days])".
Best Regards,
Jay
Hi @vipett ,
You will need to create a table contains 2, 5 and 7 as a column then use this column as slicer.
Using selectedvalue() function could get the selected slicer value.
https://docs.microsoft.com/en-us/dax/selectedvalue-function .
At last modify the formula change "+2" to "+selectedvalue('slicer'[days])".
Best Regards,
Jay
@vipett Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
The table looks like this
| SalesOrderNumber | Number of deliveries | Earliest delivery date | Last delivery date | Earliest Estimated date | Last Estimated date | Ttl backorder | OT | OTIF | Requesteddate |
| 601105 | 1 | 2021-11-15 00:00 | 2021-11-15 00:00 | 2021-11-19 00:00 | 2021-11-19 00:00 | 0 | Yes | Yes | 2021-11-19 00:00 |
| 600468 | 1 | 2021-09-24 00:00 | 2021-09-24 00:00 | 2021-09-24 00:00 | 2021-09-24 00:00 | 0 | no | no | 2021-08-23 00:00 |
| 600988 | 1 | 2021-11-02 00:00 | 2021-11-02 00:00 | 2021-11-05 00:00 | 2021-11-05 00:00 | 0 | no | no | 2021-10-22 00:00 |
| 600982 | 1 | 2021-11-02 00:00 | 2021-11-02 00:00 | 2021-11-05 00:00 | 2021-11-05 00:00 | 0 | no | no | 2021-10-22 00:00 |
| 601188 | 1 | 2021-11-10 00:00 | 2021-11-10 00:00 | 2021-11-05 00:00 | 2021-11-05 00:00 | 0 | no | no | 2021-11-05 00:00 |
| 600221 | 1 | 2021-07-27 00:00 | 2021-07-27 00:00 | 2021-07-27 00:00 | 2021-07-27 00:00 | 0 | no | no | 2021-07-23 00:00 |
| 600420 | 1 | 2021-08-14 00:00 | 2021-08-14 00:00 | 2021-08-13 00:00 | 2021-08-13 00:00 | 0 | no | no | 2021-08-13 00:00 |
| 600943 | 1 | 2021-10-08 00:00 | 2021-10-08 00:00 | 2021-10-08 00:00 | 2021-10-08 00:00 | 0 | no | no | 2021-10-08 00:00 |
| 600437 | 1 | 2021-09-09 00:00 | 2021-09-09 00:00 | 2021-09-07 00:00 | 2021-09-07 00:00 | 0 | no | no | 2021-08-19 00:00 |
| 600777 | 1 | 2021-09-27 00:00 | 2021-09-27 00:00 | 2021-09-27 00:00 | 2021-09-27 00:00 | 0 | no | no | 2021-08-26 00:00 |
OT is calculated like this:
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 39 | |
| 37 | |
| 29 | |
| 24 |
| User | Count |
|---|---|
| 120 | |
| 95 | |
| 70 | |
| 69 | |
| 65 |