0

Chart with "where" on subtable

Hi All,

I'm been trying to do this for ages and I can't figure it out or know if its even possible to do what I'm trying.

I have a page called "Performance Dashboard", within here I have a chart that has the following formula

let filteredRecords := (select 'Digital Marketing' where 'Digital Marketing Taken Out' like "Acc Man" and 'Campaign active or paused' = "1");filteredRecords

Within Digital Marketing I have a subtable called "AM Account Time Log" which looks like the attached image.

Within the Edit columns of the chart can I return "AM Total Monthly Time Spent" based on the "Month of Work" = current month, or even a date filter to it so they can change it.

Apologies if that doesn't make much sense

3 replies

null
    • Fred
    • 11 days ago
    • Reported - view

    To verify, you have a Page that has some fields that allows user to select a Month.

    On the page is a view element.

    Now you want the columns in the view element to be modified by data in the Page.

    If that is correct then you will need to use the record() command in the formula fields of your view element columns.

    A bit of background, when you are in your view element you have "left" the Page and are now in the table the view element pulls from. So how do you get data from the Page to the view element?

    For each formula field you display you need to add:

    let xPage := record(PageName,1);
    

    Now you have access to any fields from the Page you want. You can do something like this:

    sum('AM Account Time Log'['Month of Work' = xPage.fieldname].'AM Total Monthly Time Spent')
    

    I'm just guessing your structure so make sure all paths make sense and all fieldnames make seanse for you DB.

    • david.6
    • 11 days ago
    • Reported - view

    Hi Fred,

    Appreciate the response, I think that makes abit of sense to me. Below is my dashboard page

    And the formula on the Chart is as follows:

    let filteredRecords := (select 'Digital Marketing' where 'Digital Marketing Taken Out' like "Acc Man" and 'Campaign active or paused' = "1");filteredRecords

    This is my chart data and the formula is where I want to pass the original date and query a Sub Table of 'Digital Marketing' Being 'AM Account Time Log' and grab some data... quite hard to explain it when I try write it down ha

    • david.6
    • 11 days ago
    • Reported - view

     you legend, that record and also the way to filter the sub table with the square brackets has saved me!