Forum Discussion
Count Values multiplied by a measure
- 1 year ago
Hi rachk ,
Try to check with this:
Total Days Travelled =
SUMX (
SUMMARIZE (
TravelData,
TravelData[DepartureDate],
TravelData[ReturnDate],
"PeopleCount", COUNTROWS(TravelData),
"TripDays", MAX(TravelData[Number of Days])
),
[PeopleCount] * [TripDays]
)
Also please go through the updated pbix file.
If this post was helpful, please give us Kudos and consider marking Accept as solution to assist other members in finding it more easily.
Best Regards,
Menaka.
Community Support Team
Hi rachk ,
Can you try this measure once and check.
Total Days Travelled =
SUMX (
SUMMARIZE (
TravelData,
TravelData[DepartureDate],
TravelData[ReturnDate],
"@People", COUNT(TravelData[ID]),
"@Days", AVERAGE(TravelData[Number of Days])
),
[@People] * [@Days]
)
Please go through the pbix file.
If this post was helpful, please give us Kudos and consider marking Accept as solution to assist other members in finding it more easily.
Best Regards,
Menaka.
Community Support Team
I think that is getting closer. The ID moved into A1 etc but we have it counting each person who travelled so it needs to count. Number of days is already a measure based on the difference between the dates.
I dont know how you got the People part, it makes an error when I enter it, even following the above.
- v-menakakota1 year ago
Community Support
Hi rachk ,
Try to check with this:
Total Days Travelled =
SUMX (
SUMMARIZE (
TravelData,
TravelData[DepartureDate],
TravelData[ReturnDate],
"PeopleCount", COUNTROWS(TravelData),
"TripDays", MAX(TravelData[Number of Days])
),
[PeopleCount] * [TripDays]
)
Also please go through the updated pbix file.
If this post was helpful, please give us Kudos and consider marking Accept as solution to assist other members in finding it more easily.
Best Regards,
Menaka.
Community Support Team - rachk1 year ago
Helper I
Also, the total days travelled would work, IF we could get the ID to calculate if there is more than 1 person on that particular date.
- v-menakakota1 year ago
Community Support
Hi rachk ,
May I ask if you have resolved this issue? If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.
Thank you,
Community Member.
- rachk1 year ago
Helper I
OK, we have lift off! I have it working but its viewed with .00 at the end...yes I am still way over my head so apologise for this. At this point if it stays here then thats ok but if I can get it to a whole number, that would be great!
- v-menakakota1 year ago
Community Support
Hi rachk ,
We really appreciate your efforts and for letting us know the update on the issue.
It can be done by changing the values decimal places to 0. Please go through the below screenshot.
I hope this helps to resolve your query.
Thank you.