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.
O.K., this is embarrasing, but this DAX measure ...
select
*
from dbo.FACT_employees_view
where
(status = 'active' and started <= '2021-12-15')
... on MS SQL and it works fine, but here the started column is of text format, changed to Date in PowerBI Column Tools.
Dirk
Solved! Go to Solution.
Hi @MoodyDirk
I think you should wrap the date coumn with the date function for comparision, so the measure would look like
HeadCount = CALCULATE(COUNTROWS('FACT_employees'), 'FACT_employees'[started] <= date(2021,12,15) )
This should work but let us know otherwise...
Thanks,
AnthonyJoseph
Hi @MoodyDirk
I think you should wrap the date coumn with the date function for comparision, so the measure would look like
HeadCount = CALCULATE(COUNTROWS('FACT_employees'), 'FACT_employees'[started] <= date(2021,12,15) )
This should work but let us know otherwise...
Thanks,
AnthonyJoseph
Yes, this works,
Thank You, Anthony.
User | Count |
---|---|
17 | |
14 | |
13 | |
13 | |
11 |
User | Count |
---|---|
19 | |
15 | |
15 | |
11 | |
10 |