Hi,
I have been trying to figure out how to convert the following SQL query into DAX for PowerPivot.
SELECT COUNT(DISTINCT [Column1]) FROM table WHERE [Column2] = 'value1' AND [Column3] = 'value2' AND [Column4] = FALSE
AND [Column1] IN
(SELECT DISTINCT [Column1] FROM table WHERE [Column2] = 'value1' AND [Column3] = 'value3' AND [Column4] = TRUE)
) AS [WhatImTryingToFind]
To calculate this without the nested select query I used the CALCULATE function with filters.
CALCULATE(DISTINCTCOUNT(table[Column1]), [Column2] = 'value1', [Column3] = 'value2', [Column4] = FALSE)
How do I this?
Thanks for the help!
I have been trying to figure out how to convert the following SQL query into DAX for PowerPivot.
SELECT COUNT(DISTINCT [Column1]) FROM table WHERE [Column2] = 'value1' AND [Column3] = 'value2' AND [Column4] = FALSE
AND [Column1] IN
(SELECT DISTINCT [Column1] FROM table WHERE [Column2] = 'value1' AND [Column3] = 'value3' AND [Column4] = TRUE)
) AS [WhatImTryingToFind]
To calculate this without the nested select query I used the CALCULATE function with filters.
CALCULATE(DISTINCTCOUNT(table[Column1]), [Column2] = 'value1', [Column3] = 'value2', [Column4] = FALSE)
How do I this?
Thanks for the help!
Last edited by a moderator: