Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Pricey79
Helper V
Helper V

Help with trending on cards please

Hello, I was hoping someone could help me please.

 

I have a column called TYPE and this is filtered by month and then counted. So for example in May, Type A featured 10 times, Type B featured 7 times etc etc

 

Is there a way I can have a card to show on a rolling day to day basis which Type is increasing being the highest and another card showing what Type is decreasing (i/e getting better)?

 

So for example today Type D is on the increase and Type A is on the decrease

Is that possbile please?

 

Any help would be greatly appreciated

 

Thank you 

5 REPLIES 5
v-jianboli-msft
Community Support
Community Support

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:

vjianbolimsft_2-1688005475055.png

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:

vjianbolimsft_1-1688005453075.png

 

 

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.

@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

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.

Hi @v-jianboli-msft 

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?

Hi @Pricey79 ,

 

Only through your description I can't tell what exactly is wrong, please provide information about your report and the original data 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.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.