Forum Discussion
Help with trending on cards please
Hi Pricey79 ,
Yes, it is possible to create cards that show which Type is increasing and which is decreasing on a rolling day-to-day basis.
You can create two separate cards, one for the increasing Type and one for the decreasing Type, and use a combination of filters, formulas, and visualizations to display the data.
Here is my sample:
Please try:
Increase =
var _a = SUMMARIZE('Table','Table'[Type],"Today",CALCULATE(COUNT('Table'[Type]),FILTER('Table',[Date]=TODAY()&&[Type]=EARLIER('Table'[Type]))),"Pre_Day",CALCULATE(COUNT('Table'[Type]),FILTER('Table',[Date]=TODAY()-1&&[Type]=EARLIER('Table'[Type]))))
var _b = FILTER(_a,[Pre_Day]<[Today])
return CONCATENATEX(_b,[Type],",")
Decrease =
var _a = SUMMARIZE('Table','Table'[Type],"Today",CALCULATE(COUNT('Table'[Type]),FILTER('Table',[Date]=TODAY()&&[Type]=EARLIER('Table'[Type]))),"Pre_Day",CALCULATE(COUNT('Table'[Type]),FILTER('Table',[Date]=TODAY()-1&&[Type]=EARLIER('Table'[Type]))))
var _b = FILTER(_a,[Pre_Day]>[Today])
return CONCATENATEX(_b,[Type],",")
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Pricey793 years ago
Helper V
v-jianboli-msft thank you so much for taking the time to reply.
Apologies, I should have mentioned before, the date is a sperate table called Calendar. Will that still work?Thank you
- v-jianboli-msft3 years ago
Community Support
Hi Pricey79 ,
What does your raw data look like? Does the Calendar table have any relationship with your fact table?
Do you have a slicer in your report that uses data from the Calendar table.
Sorry for that the information you have provided is not making the problem clear to me. Can you please share more details to help us clarify your scenario?
Please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Refer to:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Pricey793 years ago
Helper V
Apologies and thank you for taking the time to reply. I have changed to so its all in one table now. Your DAX returns no syntax errors, however I get blank on the card?