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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
alvin1999
Frequent Visitor

Date and KPI Visual

Hi,

I have create a simple datatset for my scenario. Below is what I have tried:
1. Extracted Month and Year from Date column in date data type

2. Sorted the month column based on Month No 
3. Created a measure called Total Amount

 

My question are:
1. How can I convert the Month and Year columns into date data type instead of text and whole number data type?
2. The KPI visual unable to display the latest month from the dataset if I selected Month column in the Trend Axis field. However, no issue if I selected Date column. I want to display Month data instead of the full date in dd/mm/yyyy.

Here is the PBIX file for testing:

https://drive.google.com/file/d/1DTL2A9eq-MflJCUborPcMP-WV_e_sHW3/view?usp=sharing


Thanks for your kind advise.

5 REPLIES 5
Vallirajap
Resolver III
Resolver III

@alvin1999In my reply post, I share one pbix file. In that file, there are two columns, like year and month, in the below image. Go and see how that will be modified.

 

New one.png 

 

In rare cases, connect with me through email.

pvalliraja21@gmail.com

 

Did I answer your question?

Mark my post as a solution, this will help others...!

Hit the kudo also,

Thank you.

Vallirajap
Resolver III
Resolver III

Hii @alvin1999,

Try this,

Using the date column to create a date group in this group, you can change the format to "yyyy" and then it will show only the year in the date datatype. in the same way you used in the month also.

Vallirajap_0-1705993096614.png

Here is the output file

Drive file 

 

Did I answer your question?

Mark my post as a solution, this will help others...!

Hit the kudo also,

Thank you.

@Vallirajap can you allow me to access your file?
Thanks.

@alvin1999Now that I gave you access, please check

 

Did I answer your question?

Mark my post as a solution, this will help others...!

Hit the kudo also,

Thank you.

@Vallirajap I can access to the file now. 

May I know are you convert the date format in Column Tools > change Date type to Date/Time > Format (type MMM for month and chose yyy in the drop down list) in table view?

For Month, I got 

alvin1999_1-1706006559044.png

 

For Year, I got all the values are 1905

alvin1999_0-1706006536896.png


Can you guide me please? Thank you.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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