Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a visual that displays the daily count of the total number of open contracts. Is there a way of storing this value each day in a table?
Solved! Go to Solution.
Hi @smithshire ,
The calculation is based on your data model. I think there should be a contract table with the open date and close date for your contracts.
Create a DimDate table and then create a measure to calculate the daily count of the total number of open contracts.
DimDate = CALENDARAUTO()
Measure:
Daily count of the total number of open contracts =
CALCULATE (
COUNT ( 'Table'[Contracts] ),
FILTER (
'Table',
'Table'[Open Date] <= MAX ( DimDate[Date] )
&& 'Table'[Close Date] >= MAX ( DimDate[Date] )
)
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @smithshire ,
I think you can't save it anywhere. But few workaround as below:-
1. Stored this data in DB.
2. or Create a seperate measure which calculate the total count for yesterday like today()-1.
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Will this store each daily value?
Hi @smithshire ,
The calculation is based on your data model. I think there should be a contract table with the open date and close date for your contracts.
Create a DimDate table and then create a measure to calculate the daily count of the total number of open contracts.
DimDate = CALENDARAUTO()
Measure:
Daily count of the total number of open contracts =
CALCULATE (
COUNT ( 'Table'[Contracts] ),
FILTER (
'Table',
'Table'[Open Date] <= MAX ( DimDate[Date] )
&& 'Table'[Close Date] >= MAX ( DimDate[Date] )
)
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
That works great apart from where we have contracts that are still open that do not have an closed date. How would I amend the measure to include these in the count?
Regards
@smithshire , Table a table visual, put Date field and your measure. It will give you the count.
You can create a measure too for counting contracts: Count_of_Contracts = Count(columnname of open contracts)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
106 | |
87 | |
73 | |
66 |
User | Count |
---|---|
124 | |
113 | |
98 | |
81 | |
72 |