Forum Discussion
Handling table (visual) with multiple date fields
Hi, siemdevlieger
Thanks for the reply from Idrissshatila, please allow me to provide another insight:
Instead of creating a separate table or visual, you can create a dynamic measure that switches contexts based on user choice, or determines other logic to display data based on Submit Date or Grant Date. This can be achieved by using DAX expressions, such as and dynamically adjust the date field for measure calculations.
For example, you can create a measure that checks whether a user has opted in to view Submitted Bids or Awarded Bids, and then calculates the count based on the corresponding date field. Here's a simplified version of this measure:
Dynamic Tender Count =
SWITCH(
SELECTEDVALUE(YourSelectionColumnName, "Default"),
"Submitted", CALCULATE(COUNT(YourTenderTable[TenderID]), USERELATIONSHIP(YourTenderTable[SubmissionDate], YourDateTable[Date])),
"Awarded", CALCULATE(COUNT(YourTenderTable[TenderID]), USERELATIONSHIP(YourTenderTable[AwardDate], YourDateTable[Date])),
CALCULATE(COUNT(YourTenderTable[TenderID]), USERELATIONSHIP(YourTenderTable[SubmissionDate], YourDateTable[Date]))
)
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.