Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
I am new in dax.
Problem: I have a table which have 3 columns (ID,TYPE,DATE). ID+TYPE is unique combination.
I create running total measure:
CALCULATE(
DistinctCountID,
FILTER(
ALLSELECTED(DATE,
ISONORAFTER(DATE, MAX(DATE), DESC)
)
)
The result of the CHART IS:
But I would like to see this:
How can I rewrite the query to be able to see the redline at least a straight, if there will be no data for red TYPE in the last DATE in the chart?
(BTW: I can't create another simple table, because the ID is used in model for filtering)
Thank you in advance.
Solved! Go to Solution.
@LiborK , You shoudl use a date table, marked as date table joined with you date of table
CALCULATE(
Distinctcount(Table[ID]) ,
FILTER(
ALLSELECTED('Date') , 'Date'[Date] <= Max('Date'[Date])
)
)
Rolling Days Formula: https://youtu.be/cJVj5nhkKBw
Hi, @LiborK
You can try the following methods.
Sample data:
Measure =
CALCULATE(DISTINCTCOUNT('Table'[ID]),FILTER(ALL('Table'),[Date]<=SELECTEDVALUE('Table'[Date])))
Is this similar to the output you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, thank you for your answer. I tried your query, bud the result is different:
The data look like this example:
@LiborK , You shoudl use a date table, marked as date table joined with you date of table
CALCULATE(
Distinctcount(Table[ID]) ,
FILTER(
ALLSELECTED('Date') , 'Date'[Date] <= Max('Date'[Date])
)
)
Rolling Days Formula: https://youtu.be/cJVj5nhkKBw
Thank you, you were right.
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 |
---|---|
11 | |
11 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
11 |