Forum Discussion

Rocky050371's avatar
Rocky050371
Regular Visitor
3 years ago
Solved

Same measure

[Using a direct query]

 

Hi,

 

I have the following table

 

 

with the following measure:

 

Total Moves = COUNT(rfid_location_history[timestamp])
 
However when I test on a table I get the following
 

 

 Sure II am missing something obvious
 
Thanks
 

 

 

  • Solved, established a relationship between Date in the Rolling Calendar table and timestamp in the Moves table.

6 Replies

    • Rocky050371's avatar
      Rocky050371
      Regular Visitor

      Effectively what I am after is Moves broken down by month so I can use a KPI on the current and previous month. I think I have gone down this route based on an example but there must have been other factors in play.

       

      Thank you for your continued help

  • Rocky050371's avatar
    Rocky050371
    Regular Visitor

    As the initial table is time based, I expected filtering by month would provide monthly totals, is this not correct? 

    • Syk's avatar
      Syk
      Icon for Resident Rockstar rankResident Rockstar

      Right now, you're just counting your timestamp column.

  • Rocky050371's avatar
    Rocky050371
    Regular Visitor

    The example I was referencing was

     

     

    Where the revenue was

    Total Revenue =
    SUMX(
        'Sales Data',
        'Sales Data'[OrderQuantity]
        *
        RELATED(
            'Product Lookup'[ProductPrice]
        )
    )
     
    and the month element was

     

    If I switched to COUNTX would that give the the monthly grouping of moves or do I need to build a query to get this?



  • Rocky050371's avatar
    Rocky050371
    Regular Visitor

    Solved, established a relationship between Date in the Rolling Calendar table and timestamp in the Moves table.