Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
pmcinnis
Helper III
Helper III

¿Qué tiene de malo este script DAX?

Le agradecería que alguien pudiera corregir mi error en el siguiente script DAX:

res ct terminado ?
CALCULAR(
COUNTROWS('Datos'),
FILTRO (
ALLEXCEPT('Data','Data'[Parameter]),[Sample Type]-"TREATED WATER" O "DISTRIBUTION"))
Cuando escribo el script anterior para crear una nueva medida en Desktop, obtengo el siguiente error: La sintaxis de 'OR' es incorrecta. (DAX(CALCULATE(COUNTROWS('Data'),FILTER(ALLEXCEPT('Data','Data'[Parameter]),[Sample Type]-"TREATED WATER" Or "DISTRIBUTION")))).
He probado diferentes variaciones de sintaxis, pero no hay suerte de conseguir que funcione. Gracias
1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

Hola @pmcinnis

Tratar

res ct finished =
CALCULATE(
   COUNTROWS('Data'),
      FILTER(
         ALLEXCEPT('Data','Data'[Parameter]),[Sample Type]="TREATED WATER" || [Sample Type]="DISTRIBUTION"))

O

res ct finished =
CALCULATE(
   COUNTROWS('Data'),
      FILTER(
         ALLEXCEPT('Data','Data'[Parameter]),OR([Sample Type]="TREATED WATER", [Sample Type]="DISTRIBUTION")))

O

res ct finished =
CALCULATE(
   COUNTROWS('Data'),
      FILTER(
         ALLEXCEPT('Data','Data'[Parameter]),[Sample Type] IN {"TREATED WATER", "DISTRIBUTION"}))

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

2 REPLIES 2
az38
Community Champion
Community Champion

Hola @pmcinnis

Tratar

res ct finished =
CALCULATE(
   COUNTROWS('Data'),
      FILTER(
         ALLEXCEPT('Data','Data'[Parameter]),[Sample Type]="TREATED WATER" || [Sample Type]="DISTRIBUTION"))

O

res ct finished =
CALCULATE(
   COUNTROWS('Data'),
      FILTER(
         ALLEXCEPT('Data','Data'[Parameter]),OR([Sample Type]="TREATED WATER", [Sample Type]="DISTRIBUTION")))

O

res ct finished =
CALCULATE(
   COUNTROWS('Data'),
      FILTER(
         ALLEXCEPT('Data','Data'[Parameter]),[Sample Type] IN {"TREATED WATER", "DISTRIBUTION"}))

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

¡Gracias!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors