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 Team,
I have a data of Start date and End date and product id. I want to calcuate count of product Id based condition on start date and end date.
Example- I want to calcuated count
select count (*) from tabel
where startdate >= '1-8-2019' and end date <= '31-8-2019'
So want to calculate count for every month Jan to Dec based on Start date and end date.
Could you please give some idea about this.
Thanks
Take a look at the function CALCULATE() it allows you to add more than one filter expression
VAR row_count = CALCULATE(COUNTROWS(table),startdate >= '1-8-2019' ,end date <= '31-8-2019')
this example assumes that there are not external filters on your table, if there are you might want to include a filter expression using ALL()---> ALL(table)
Help when you know. Ask when you don't!
Hi,
Thanks for solution.
But I have to do it for all months. I am having data more than 3 years so i want to visuals year wise start date and end date values in X axis.
Please suggest.
Got solution from blow link
Thanks!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
10 | |
10 | |
9 | |
9 |
User | Count |
---|---|
20 | |
13 | |
13 | |
11 | |
8 |