Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi community i know this issue is an absurd but im not figuring how to create this meassure...
I need to create a meassure where it calculates the count of Envios but when Entregado = N and Rendido = S
Heres my SQL Server Query i want to put it in power bi measure...
How can i do it??
(select count(env.EnvioID) from envios env where env.Rendido = 'S' and env.Entregado = 'N' and Anulado = 0) as CompNoEntregados,
Solved! Go to Solution.
If you can share sample/example data and your expected output, can be more specific. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490.
In general, you can do something like:
Measure = SUMX(FILTER('envios',[Rendido] = "S" && [Entregado] = "N" && [Anulado] = 0),[Some Value])
The thing i need to achive is this!!
And its a count not a sum!!
Im trying to put all this values in a table with Power Bi (All the colums are generated by differents querys in SQL SERVER). So the thing i want to show now is the column "No Entregados" because i have a page filter where takes the status of Entregado = 'S' and Rendido = 'S' but know i need to know wich ones are Entregado = 'N' and Rendido = 'S'
Ty for the Reply!!!
Well, if it is a count, then you use COUNTX instead of SUMX. If you are page filtering stuff out, you might need to use ALL. So perhaps something like this:
Measure = COUNTX(FILTER(ALL('envios'),[Rendido] = "S" && [Entregado] = "N" && [Anulado] = 0),[Some Value])
Sample source data would really assist greatly. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Whats the meaning of [Some Value] in your sintax???
For what i saw the rest of the sintax is the thing i need to achive
Some column that you want to count. Could probably be any column.
It says that when i inset the new measure in the table..
I will tell you the data type from all of that
EnvioID = Bigint
Entregado = Nvarchar(1)
Rendido = Nvarchar(1)
Anulado = bit
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.