Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Preparing for a certification exam? Ask exam experts all your questions on May 15th. 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.
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
19 | |
13 | |
10 | |
9 | |
9 |