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.
Created this measure based on the formula below but no data is returned. The MessageStatusCode field is varchar not numeric which is why I used VALUE
"TotalTxts2 = CALCULATE( COUNTROWS('pas tbl_OPSMSSent'), FILTER(VALUES( 'pas tbl_OPSMSSent'), 'pas tbl_OPSMSSent'[MessageStatusCode] = "0" ) )"
"ColorGreen = CALCULATE( COUNTROWS(‘Demo’), FILTER( VALUES(‘Demo'[Color]), ‘Demo'[Color] = “Green” ) )"
Solved! Go to Solution.
Thanks for reply, I posted again as wasn't getting any replies and got the solution I needed.
Hi, @WDHB01
Thank you for your sharing.
If your problem has been solved, you can accept your reply as Solution to close this thread.
More people will learn new things here.
Best Regards,
Community Support Team _ Eason
Hi, @WDHB01
The formula needs a small change:
TotalTxts2 =
CALCULATE(
COUNTROWS('pas tbl_OPSMSSent'),
'pas tbl_OPSMSSent'[MessageStatusCode] = "0"
)
If it doesn't meet your requirement,please share your sample data for futher research.
Best Regards,
Community Support Team _ Eason
Thanks for reply, I posted again as wasn't getting any replies and got the solution I needed.
What's your question here?
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
It should return a count of all rows that have a column value of "0"
@WDHB01
Try this please:
TotalTxts2 =
CALCULATE(
COUNTROWS('pas tbl_OPSMSSent'),
'pas tbl_OPSMSSent'[MessageStatusCode] = 0
)
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Thanks for the reply.
Get error message.
Error Message:
MdxScript(Model) (4, 84) Calculation error in measure 'pas tbl_OPSMSSent'[TotalTxtsSent]: DAX comparison operations do not support comparing values of type Text with values of type Integer. Consider using the VALUE or FORMAT function to convert one of the values.
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 |
---|---|
111 | |
95 | |
77 | |
68 | |
54 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |