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
Anonymous
Not applicable

MTD YTD issue on histogram

Hey guys, i am really struggling with this right now, hope you can help me. Basically, I finally got the right numbers using MTD and YTD for my calculations but now I need to display them on the histogram, but I need them to be split up on histogram like three seperate measures, just like shown below. However, This is what I get right now. And everytime i take off date hierarchy or  do something else, then the MTD function doesnt work. 

Gediminas12_1-1604998520222.png

 

Gediminas12_0-1604998496639.png

 

1 ACCEPTED SOLUTION
v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

According to my understand , you want to set measure name as X-axis, right?

You could create a new table like this:
11.12.2.1.PNG 

And then use SWITCH() function to match each measure:

Measure =
SWITCH ( MAX ( 'For X-axis'[Type] ), "YTD", [YTD], "MTD", [MTD] )

Then you could "seperate" measures in visual:

11.12.2.2.PNG

Here is the pbix file.

 

Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please upload some insensitive data samples and expected output.

 

Best Regards,
Eyelyn Qin

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

@v-eqin-msft  It actually worked now !! Thank you so much.

v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

According to my understand , you want to set measure name as X-axis, right?

You could create a new table like this:
11.12.2.1.PNG 

And then use SWITCH() function to match each measure:

Measure =
SWITCH ( MAX ( 'For X-axis'[Type] ), "YTD", [YTD], "MTD", [MTD] )

Then you could "seperate" measures in visual:

11.12.2.2.PNG

Here is the pbix file.

 

Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please upload some insensitive data samples and expected output.

 

Best Regards,
Eyelyn Qin

Anonymous
Not applicable

@v-eqin-msft  Hi Eyelyn, thats actually very helpful. The only thing is that instead of YTD I want to display MTD LY, but when I change everything to that, I get blank histogram.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

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.