Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi,
I have calculation in tableau like below, I need to replicate this calculation in Power Bi.
sum({
INCLUDE DATEPART("month",[Date]) :
COUNTD(
IF [Date] >= [start Date] and [Date] <= [End date]
THEN [ID]
END
)
})
my calculation:
I have tried in multiple ways. With existance of month in table i am getting correct result, but if i remove month the result coming wrong like summing into number of months.Could anyone help me.
Hi @SravaniG ,
Try the following code:
ttt =
SUMX (
FILTER (
ALLSELECTED('Table'[Date]),
'Table'[Date] >= [Start DATE]
&& 'Table'[Date] <= [End Date]
),
DISTINCTCOUNT ( 'Table'[ID] )
)
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsI need to show product type and this metric in table. it is showing like kind of grand total, Same value for all product types.
Hi @SravaniG ,
It is very difficult to analyze without looking at the data and just by imagining.
Could you share the sample pbix via cloud service like onedrive for business or paste the sample data?
Please remove any sensitive data before uploading.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 78 | |
| 48 | |
| 35 | |
| 31 | |
| 27 |