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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
gk1d09
Frequent Visitor

Card First and Show Items with no data

Hello,

 

When I select first from the Visualisation pane for my item it does not show the first item. In table view of the card, the First items is blank and this does not get selected. 

 

Also strangely, the order of the items in Show Table for the card are a different order to the Filtered items in the Data view.

gk1d09_0-1611650920999.png

 

gk1d09_1-1611650984258.png

 

 

 

How can I show the latest/First Item in a Card even if the value is blank? And why when I select First does it not give me the "First" item that is in the Data view?

 

Thanks

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

Hi @gk1d09 ,

 

As a workaround, you can create an index column and put it in table visual too.

For exmaple:

Capture1.PNGCapture2.PNG

Turn off word wrap for column header and reduce the column spacing to hide the Index:
Capture3.PNG

 

1.gif

 

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

 

Best Regards,

Dedmon Dai

View solution in original post

9 REPLIES 9
v-deddai1-msft
Community Support
Community Support

Hi @gk1d09 ,

 

As a workaround, you can create an index column and put it in table visual too.

For exmaple:

Capture1.PNGCapture2.PNG

Turn off word wrap for column header and reduce the column spacing to hide the Index:
Capture3.PNG

 

1.gif

 

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

 

Best Regards,

Dedmon Dai

PhilipTreacy
Super User
Super User

Hi @gk1d09 

Download this sample PBIX file to see the following steps/code

Add an Index (Sort By) Column in Power Query add Close & Apply.

sort-by.png

In the Model View,click on the Progress column and under Properties -> Advanced, choose Sort by column 'Sort By' (or whatever you called it)

sortby-col.png

sort-tab.png

regards

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Hello,

 

Thank you for the reply. This is what I get:

gk1d09_0-1611720714622.png

 

There could be duplicates and blanks in Progress, could this be contributing to the issue?

 

Thanks

Hi @gk1d09 

Did you download my file and check it out?

You should have created a new column, that I called Sort By. 

This column contains unique values - see the screenshot above - that allows sorting.  Duplicates or blanks in the Progress column don't matter.

Can you please supply a screenshot of your data columns so I can see what you have.

Better still, can you supply your PBIX file?

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Hello,

I managed to achieve what I needed using the below.

 

Last date = LASTNONBLANK(HighlightReport[Date],1)

LatestProgress = if(HASONEFILTER(Project[ProjectID]),LOOKUPVALUE(HighlightReport[Progress],HighlightReport[Date],[Last date],HighlightReport[ProjectID],VALUES(HighlightReport[ProjectID])),"None")

I tried with your proposed solution. The sort By column I created was just called Index. When I changed the dropdown to Sort By Index, I got the error I pasted. 

 

Thanks,

Hi @gk1d09 

Your original post showed an error caused by the column Index that you started with, which is why I renamed the column I created to Sort By.  Are you sure you weren't still trying to sort by the original Index column that had duplicate values?

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Hello,

 

I have created the sort by index and it is still showing the same error.

 

gk1d09_0-1611735427780.png

 

PhilipTreacy
Super User
Super User

Hi @gk1d09 

The visual is showing you the text sorted alphabetically A-Z, and the BLANK comes before any text. So when you select the First item and see a blank, that is correct.

What you need to do is sort the visual by another column.  Either one you already have but haven't shown in your screenshot, or create one. 

Can you share some data as a file or copy/paste it - NOT as a screenshot.

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Hello,

 

I can see its alphabetically, I didnt really notice that. There is quite a lot of data, so sending would be hard. i do have an index column in that table, but when I select that as the Sort I get this:

2021-01-26 10_01_30-Window.png

I wish it would pull the data exactly as is from the dataset, then First would make sense. Or something that would just select Latest.

 

Thanks,

Graeme

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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