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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
aadelacr
Frequent Visitor

Distinct Count of Blank Lines

Hey Everyone, i am essentially needing a distinct count of all the lines below (displayed in the left) to be reflected in the card to the right. I need a calculation to look at a distinct count of all items which have a blank in order quantity (disregard the placeholder coulumn). I essentially need the Count of Desc column of 140 to be reflected in the card to the right.

 

My table names are Articles (i am using Desc in this table), Purchase History ( I am using Order Quantity in this table)

 

PBI.jpg

 

2 REPLIES 2
Anonymous
Not applicable

Hi @aadelacr ,

If I understand correctly, the issue is that you don’t know how to display the selection in the details page. Please try the following methods and check if they can solve your problem:

1.Create the simple tables.

vjiewumsft_0-1702950434117.png

 

vjiewumsft_1-1702950441523.png

 

2.Click on Modeling in the top menu, then click on New Measure.

vjiewumsft_2-1702950465947.png

 

3.Enter the following DAX formula for the measure:

 

Articles_without_orders =
CALCULATE (
    DISTINCTCOUNT ( Articles[Desc] ),
    FILTER ( 'Purchase History', ISBLANK ( 'Purchase History'[Order Quantity] ) )
)

 

 

4.Add the measure to a card visual to display the distinct count of blank lines.

vjiewumsft_3-1702950544153.png

 

If the above ones can’t help you get it working, could you please provide more raw data(exclude sensitive data) with Text format to make a deep troubleshooting? It would be helpful to find out the solution.

 

Looking forward to your replay.

 

Best Regards,

Wisdom Wu

 

 

Still recieving a "blank" when inserting it into the card. 

 

 

aadelacr_0-1702995284742.png

 

 

Sample data:

 

Articles Table

ItemItem Desc
aChair
bStool
cGloves
dBox Cutter
eLatter

 

 

Purchase History

Order #Item #Item DescOrder Quant
12345aChair100
11223aChair150
11234bStool300
99564cGloves60
45013cGloves30

 

 

I have a many to one relationship where the "Articles" table filters "Purchase History"

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.