Forum Discussion
Creating column in date table that counts rows per month if they meet a criteria
- 11 months ago
Hi Chamari,
Issue is with the DAX you are using, use below DAX to create new calculated column in date table
RaisedbyResCount =
CALCULATE(
COUNTROWS(RELBs),
RELBs[RaisedbyRes] = "Y",
RELBs[YearMonthNumber] = DateTable[YearMonthNumber]
)Or you can use below measure if there's relationship between your date table and RELBs
RaisedbyResCount =
CALCULATE(
COUNTROWS(RELBs),
RELBs[RaisedbyRes] = "Y"
)๐ I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
๐ก Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
๐ As a proud SuperUser and Microsoft Partner, weโre here to empower your data journey and the Power BI Community at large.
๐ Curious to explore more? [Discover here].
Letโs keep building smarter solutions together!
Hi Chamari,
Issue is with the DAX you are using, use below DAX to create new calculated column in date table
RaisedbyResCount =
CALCULATE(
COUNTROWS(RELBs),
RELBs[RaisedbyRes] = "Y",
RELBs[YearMonthNumber] = DateTable[YearMonthNumber]
)
Or you can use below measure if there's relationship between your date table and RELBs
RaisedbyResCount =
CALCULATE(
COUNTROWS(RELBs),
RELBs[RaisedbyRes] = "Y"
)
๐ I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
๐ก Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
๐ As a proud SuperUser and Microsoft Partner, weโre here to empower your data journey and the Power BI Community at large.
๐ Curious to explore more? [Discover here].
Letโs keep building smarter solutions together!
Thank you so much,
I had to remove the last part from the DAX ( = DateTable[YearMonthNumber]) to get it to work but this has worked, thank you ๐