Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Create Table with distinct values and count them

Hello, I've started working with Power BI desktop, and trying to count how many items I have in a period(it's dynamic) This is my source table product A: Serial# Manufacturing  date Sale Date...
  • johnt75's avatar
    johnt75
    4 years ago

    Create an inactive relationship from your Date table to the Sale Date column and then you can use USERELATIONSHIP, like

    Num sales = CALCULATE( COUNTROWS('Table'), USERELATIONSHIP( 'Date'[Date], 'Table'[Sale date]))