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

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.

Reply
atul9063
Helper III
Helper III

Not able to add Product Category Name in legend field in Line Chart

Hi,

 

I want to display Total Profit and Total Revenue both in Line chart for ProductCategory Name as legend. But i m not able to add it chart ProductCategory name in legend field.

 

image.png

 

Thanks

6 REPLIES 6
v-lili6-msft
Community Support
Community Support

hi, @atul9063

There is nothing wrong with your formula. since you need to calculate MoM%, you need to drag the field 'Calender'[Date]

from Calender table into visual, this will calculate with Time Intelligence.

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ame tI have done thing but its not working.Anyway now im calculating in SQL

hi, @atul9063

You could just drag the field 'Calender'[Date] into Columns value of Matrix like below:

10.JPG

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Super User
Super User

See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Greg_DecklerCan you share MoM% change formula in DAX without using time intellugence function?

Should be something along the lines of:

 

TITHW_%ChangeYoY = 
VAR __MaxYear = MAX('Years'[Year])
VAR __MaxMonth = MAX('Months'[MonthSort])
VAR __TmpTable = CALCULATETABLE('TheHardWay','Years'[Year]=__MaxYear,All('Months'[Month]))
VAR __currentMonth = SUMX(FILTER(__TmpTable,[MonthSort] = __MaxMonth),[Value])
VAR __previousMonth = SUMX(FILTER(__TmpTable,[[MonthSort] = __MaxMonth - 1),[Value])
RETURN DIVIDE(__currentMonth - __previousMonth,__previousMonth,0)

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors