The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
Then, I make a measurement, where if the value A minus B is positive, 1, otherwise 0.
Then, in a matrix, as rows I put the days of the week, as columns, the hours, and as value, the measurement made.
So far, so good.
The problem is that I want to have in a card, a counter of occurrences in which the value of the measure is 1. I want the sum of all the yellow cells.
I have tried to use COUNTAX, but I cannot group by time and date because they come from two independent tables (it has to be).
Thanks everyone!!
Solved! Go to Solution.
@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! |
@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! |
User | Count |
---|---|
25 | |
10 | |
8 | |
7 | |
6 |
User | Count |
---|---|
32 | |
12 | |
10 | |
10 | |
9 |