Forum Discussion
Stacked Bar or Line Chart Using Multiple Data from Same Table along with a Date/Calendar Table
- 2 years agoCount Closed =CALCULATE(COUNT(Data[Closed]),USERELATIONSHIP(Dates[Date], Data[Closed]))Count Created =CALCULATE(COUNT(Data[Created]),USERELATIONSHIP(Dates[Date], Data[Created]))As you have an active relationship on Date created you can use directly as a DAX Measure =COUNT(Data[Created]) , but I like to keep the consistency between the formula patterns. It will work either way.I slightly changed your sample data as the count was the same between the two
If it answers your query please mark my post as a solution
If it answers your query please mark my post as a solution
Is there a way to ensure that it's only pulling back fields with an actual closed date populated? My source is a SharePoint list and empty closed dates are populated with 'null' in PowerQuery. I tried adding a filter [Closed_Date] <> "" and also [Closed_Date] <> null, and other variations but it fails.
- Alex872 years agoSolution Sage
It is a weird behavior. You can try different ways to filter out data
if this does not work:
Table.SelectRows(#"Removed Columns", each [Closed] <> null and [Closed] <> "")
try filter data after a certain date:
Table.SelectRows(#"Filtered Rows", each [Closed] > #date(2020, 1, 1))
or maybe you can duplicate the column and transform the datatype to whole number and filter out the nulls or values above a certain amount.