Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
ROUND((SUM(CASE WHEN CHALLENGERESULT = 'ABC' AND CREATEDTIMESTAMP BETWEEN TRUNC(TO_DATE('26-JAN-2019','DD-MON-YYYY'))-8 AND TRUNC(TO_DATE('26-JAN-2019','DD-MON-YYYY')) THEN 1 ELSE NULL END)/SUM(CASE WHEN CHALLENGERESULT IS NOT NULL AND CREATEDTIMESTAMP BETWEEN TRUNC(TO_DATE('26-JAN-2019','DD-MON-YYYY'))-8 AND TRUNC(TO_DATE('26-JAN-2019','DD-MON-YYYY')) THEN 1 ELSE NULL END))*100,2)
How to implement this in power bi ?
Here we have a column in our database named CHALLENGERESULT that contains 3 types of values : 'ABC', 'DEF' and 'OTHERS'
Please help me with the same.
Solved! Go to Solution.
Try
Calc =
var _date1 = date(2016,01,26)
var _date2 = date(2016,01,26)+8
calculate(countroes(table),filter(table, challengeresult = 'ABC' && createdtimestamp>=_date1 && createdtimestamp<=_date2))/
calculate(countroes(table),filter(table, not(isblank(challengeresult)) && createdtimestamp>=_date1 && createdtimestamp<=_date2))
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p...
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
Give ABC in " instead of '
"ABC" and Try
Try
Calc =
var _date1 = date(2016,01,26)
var _date2 = date(2016,01,26)+8
calculate(countroes(table),filter(table, challengeresult = 'ABC' && createdtimestamp>=_date1 && createdtimestamp<=_date2))/
calculate(countroes(table),filter(table, not(isblank(challengeresult)) && createdtimestamp>=_date1 && createdtimestamp<=_date2))
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p...
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
It is giving me an error "cannot find table 'ABC' ".
But 'ABC is the value that is there in the column CHALLENGERESULT'
How to solve this issue ?
Please share your formula
Give ABC in " instead of '
"ABC" and Try
Hi ,
I have shared the formula.
Can you please suggest how to correct the same ?
Thanks !
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |