Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi, I am farily new to Dax and I need to replicate in Power BI this formula I have on Excel. I need to create a calculated in Power Bi that will look for how many times a number appears on a Column name DEL Delivery Reference and if it appears 1 time, the result should be 1 in the calculated column, if it appears 2 times, the result should 0.5 (1/2), if it appears 3 times the resul should be 0,3333 (1/3), and so on.
Any help would be deeply appreciated.
Solved! Go to Solution.
Hi,
I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file whether it suits your inquiry.
Calculated column expected result =
DIVIDE (
1,
COUNTROWS (
FILTER (
Data,
Data[DEL Delivery reference] = EARLIER ( Data[DEL Delivery reference] )
)
)
)
It worked just fine. Thank you very much for the prompt help. Best Regards
It worked just fine. Thank you very much for the prompt help. Best Regards
Hi,
I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file whether it suits your inquiry.
Calculated column expected result =
DIVIDE (
1,
COUNTROWS (
FILTER (
Data,
Data[DEL Delivery reference] = EARLIER ( Data[DEL Delivery reference] )
)
)
)
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
19 | |
14 | |
8 | |
7 |