Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
I would like to create a measure that only returns the number of leads created for the current month (Count of Lead[ID])
So far I have the following:
Solved! Go to Solution.
Hi @actzikas ,
Please add '' at Lead[ID].
You can use FORMAT() function as well, please modify the formula as below.
Is Current Month Lead =
CALCULATE (
COUNT ( 'Lead'[ID] ),
FILTER (
'Lead',
FORMAT ( 'Lead'[CreatedDate], "YYYYMM" ) = FORMAT ( TODAY (), "YYYYMM" )
)
)
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @actzikas ,
Have your problem be solved? Please consider accept the answer as a solution if it worked.
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @actzikas ,
Please add '' at Lead[ID].
You can use FORMAT() function as well, please modify the formula as below.
Is Current Month Lead =
CALCULATE (
COUNT ( 'Lead'[ID] ),
FILTER (
'Lead',
FORMAT ( 'Lead'[CreatedDate], "YYYYMM" ) = FORMAT ( TODAY (), "YYYYMM" )
)
)
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Lead is coming in ' ' at two place then it should in ' at all place.
Month and year for created date are not closed properly
CALCULATE(COUNT('Lead'[ID]), Filter('Lead', MONTH('Lead'[CreatedDate]) = Month(Today())), FILTER('Lead', YEAR('Lead'[CreatedDate])= Year(Today())))
CALCULATE(COUNT('Lead'[ID]), Filter('Lead', MONTH('Lead'[CreatedDate]) = Month(Today()) && YEAR('Lead'[CreatedDate])= Year(Today())))
I would recommend, join your created date with a date table and you date table and date from date table instead of created date
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s.
Refer
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin
I couldn't find any evidence for it but it looks like ->lead<- is a reserved keyword.
So try putting quotes round every mention of it, instead of just some.
Also the double filter can be combined I think, using &&
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
115 | |
112 | |
105 | |
95 | |
58 |
User | Count |
---|---|
174 | |
147 | |
136 | |
102 | |
82 |