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
danielsouza
Helper III
Helper III

Need help to build a report

I'm trying to build a graphic report, line ou bars, but it is not working:

 

Capturar.JPG

 

 

I need something like this:

Desc.png

 

 

 

2 ACCEPTED SOLUTIONS
shebr
Resolver III
Resolver III

Hi @danielsouza

 

You need to un-pivot your columns and link them to a date table.

 

1. First see this video and create a date table. https://youtu.be/vJ7xNUK8sQE

2. Next go to your query editor for your query, highlight the first column [Description] by clicking on the header, right click the header and click 'Unpivot Other Columns'. This will put your data in a better format. You then need to perhaps add a year and day to your Month and create a 'Date'.

3. Link the date to the date table in your relationships

4. You should then be able to create the graph as you showed.

 

Let me know how you get on.

 

Thanks

 

shebr

View solution in original post

In DAX, you can do this:

 

 

Month Name =
FORMAT ( DATE ( 2017, 'Table'[Month Number], 1 ), "mmmm" )

 

 

You can replace 2017 with any year you want. The goal here to is to create a valid date and extract the month name from that date.

By the way, what are you going to do with 13?










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

7 REPLIES 7
danextian
Super User
Super User

Hi @danielsouza,

 

I saw this coming when I saw the screenshot of your model in your other post. You data is in a columnar model so it has to be transformed into a tabular one. And yes, as @shebr mentioned, you need to unpivot all other columns in your data except  excep for descricao. If you have a total column, you might want to remove that first before unpivoting.

 

If you can post a dummy data with the same structure as in your screenshot, I can get you started with the query.










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

We are doing great so far.

 

Do you have any idea how to transform the column data, numbers to months?

 

Like 1=january, 2 = february...

 

Capturar.JPG

 

 

 

In DAX, you can do this:

 

 

Month Name =
FORMAT ( DATE ( 2017, 'Table'[Month Number], 1 ), "mmmm" )

 

 

You can replace 2017 with any year you want. The goal here to is to create a valid date and extract the month name from that date.

By the way, what are you going to do with 13?










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

13 was a totalized row, I already clean this up.

 

Is this a measure or calculated column? Is not accepting the parameters, something wrong?

 

Capturar.JPG

 

 

 

Based on the error, you have entered it as a measure. Should be a calculated column.










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Yeah, it must be a calculated column.

 

Succeded!

 

Many thanks man!

 

Capturar.JPG

 

 

 

shebr
Resolver III
Resolver III

Hi @danielsouza

 

You need to un-pivot your columns and link them to a date table.

 

1. First see this video and create a date table. https://youtu.be/vJ7xNUK8sQE

2. Next go to your query editor for your query, highlight the first column [Description] by clicking on the header, right click the header and click 'Unpivot Other Columns'. This will put your data in a better format. You then need to perhaps add a year and day to your Month and create a 'Date'.

3. Link the date to the date table in your relationships

4. You should then be able to create the graph as you showed.

 

Let me know how you get on.

 

Thanks

 

shebr

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.