The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 😀
User | Count |
---|---|
27 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
31 | |
15 | |
12 | |
7 | |
6 |