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
Hi, may i know what should I code if I wanted to know the ratio of the row item that 'PO date' is greater than 'Invoice Date'?
for example, the picture below show 2 row item out of 5 has PO date > Invoice Date. the ratio is 2/5 = 40%.
May I know how can I get this logic in Power BI.
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
Ratio measure: =
VAR POgreaterthanInvoice =
COUNTROWS ( FILTER ( Data, Data[PO Date] > Data[Invoice Date] ) )
VAR allcount =
COUNTROWS ( Data )
RETURN
DIVIDE ( POgreaterthanInvoice, allcount )
Hi,
Please check the below picture and the attached pbix file.
Ratio measure: =
VAR POgreaterthanInvoice =
COUNTROWS ( FILTER ( Data, Data[PO Date] > Data[Invoice Date] ) )
VAR allcount =
COUNTROWS ( Data )
RETURN
DIVIDE ( POgreaterthanInvoice, allcount )
It works !! thank you so much, it shows excatly what I am looking for ! Appreciate 😀
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 12 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 32 | |
| 28 | |
| 19 | |
| 11 | |
| 10 |