Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi there,
i am pretty new to dax and hope for your help with the following measure:
Test =
VAR no1 =
CALCULATETABLE ( VALUES (Orders_Facts[Customer No. ] ) )
VAR no2 =
FILTER ( no1, [Filter] <> 0 )
RETURN
COUNTROWS ( no2 )
The base for the first measure is the following:
Filter =
CALCULATE (
SUM ( Sales_SCA[Calc. net-net turnover] ),
Sales_SCA[AC_PL] = "Ist",
TREATAS ( VALUES ( Orders_Facts[Item No.] ), Sales_SCA[Item No] ),
TREATAS ( VALUES ( Orders_Facts[Customer No.] ), Sales_SCA[Customer No] )
)
the problem is the filter i assume, but i havent found an other way to write it which delivers the correct result.
Thank you in advance for your efforts and KR,
KO
Solved! Go to Solution.
Hi @trying ,
Please try:
Test =
COUNTROWS (FILTER(VALUES(Orders_Facts[Customer No. ] ),ABS([Filter])>0))
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the help guys!
Hi @trying ,
Please try:
Test =
COUNTROWS (FILTER(VALUES(Orders_Facts[Customer No. ] ),ABS([Filter])>0))
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You can simplify Test with:
test =
VAR no2 =
FILTER ( VALUES ( Orders_Facts[Customer No. ] ), [Filter] <> 0 )
RETURN
COUNTROWS ( no2 )
How is the model set up?
Proud to be a Super User!
Paul on Linkedin.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 33 | |
| 29 |
| User | Count |
|---|---|
| 134 | |
| 96 | |
| 78 | |
| 67 | |
| 65 |