Forum Discussion
eomedes
Advocate I
4 years agoCounting grouped occurrences
Hello, I make a summary of the situation. I have a dimension table of calendar and another one of hours, and on the other hand, two tables of facts both related to those dimension tables. ...
- 4 years ago
eomedes try this:
Measure = COUNTROWS( FILTER( ADDCOLUMNS( CROSSJOIN( VALUES('Days'[Date]), VALUES('Hour'[Hour]) ), "@Test", [Difference A-B] ), [@Test] = 1 ) )Or this (depandant on your business case):
Measure = COUNTROWS( FILTER( ADDCOLUMNS( CROSSJOIN( VALUES('Days'[Day Of Week]), VALUES('Hour'[Hour]) ), "@Test", [Difference A-B] ), [@Test] = 1 ) )In case it answered your question, please accept it as a solution to help the other members find it more quickly. Appreciate Your Kudos 💪
Showcase Report – Contoso By SpartaBI
Website Linkedin Facebook
This is SpartaBI!
SpartaBI
Community Champion
4 years agoeomedes try this:
Measure =
COUNTROWS(
FILTER(
ADDCOLUMNS(
CROSSJOIN(
VALUES('Days'[Date]),
VALUES('Hour'[Hour])
),
"@Test", [Difference A-B]
),
[@Test] = 1
)
)
Or this (depandant on your business case):
Measure =
COUNTROWS(
FILTER(
ADDCOLUMNS(
CROSSJOIN(
VALUES('Days'[Day Of Week]),
VALUES('Hour'[Hour])
),
"@Test", [Difference A-B]
),
[@Test] = 1
)
)
| In case it answered your question, please accept it as a solution to help the other members find it more quickly. Appreciate Your Kudos 💪 Showcase Report – Contoso By SpartaBI Website Linkedin Facebook This is SpartaBI! |