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
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
v-jiewu-msft
Community Support
Community Support

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
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.