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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Solution Authors