Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi,
I have a issue I can't seem to figure out myself. I have a measure that counts number of rows from my table for the last two weeks from today. Then I use a filter to count only rows that contains certain countries. This works exactly as expected.
Then I want to do the exact same thing for rolling last two complete weeks. Counting works fine using this measure:
Last two complete weeks =
CALCULATE(
COUNTROWS(
Table1
),
Date[RelativeISOWeekNumber] in {-1, -2}
)
The difference comes when I use this measure to count the number of rows with textfilter..
Filtered Complete two weeks =
VAR _ENG = CALCULATE([Last two complete weeks],
FILTER(
Table1,
LEFT(Table1[Description], 3) = "Eng")
)
VAR _WA = CALCULATE([Last two complete weeks],
FILTER(
Table1,
LEFT(Table1[Description], 3) = "Wal")
)
Return
_ENG + _WA
the only thing that I've changed from rolling last two weeks is the date filter. The working one I'm using using this:
Solved! Go to Solution.
try this
Filtered Complete two weeks =
VAR _ENG = CALCULATE([Last two complete weeks],
FILTER(ALL(
Table1),
LEFT(Table1[Description], 3) = "Eng")
)
VAR _WA = CALCULATE([Last two complete weeks],
FILTER(ALL(
Table1),
LEFT(Table1[Description], 3) = "Wal")
)
Return
_ENG + _WA
try this
Filtered Complete two weeks =
VAR _ENG = CALCULATE([Last two complete weeks],
FILTER(ALL(
Table1),
LEFT(Table1[Description], 3) = "Eng")
)
VAR _WA = CALCULATE([Last two complete weeks],
FILTER(ALL(
Table1),
LEFT(Table1[Description], 3) = "Wal")
)
Return
_ENG + _WA
User | Count |
---|---|
85 | |
77 | |
68 | |
49 | |
41 |
User | Count |
---|---|
111 | |
56 | |
50 | |
42 | |
40 |