Skip to main content

#Tableau Desktop & Web Authoring176 人正在讨论

I have a complicated issue due to how the shareholders want the data displayed and the calculations involved. 

What I am trying to do is simply get for Month 1 for the [Projected Carry From Prior Month] to be  

Month 0 ([Shipments Calc] + Month 0 [LOD Actual Demand]) -  Month 0 [Forecast) resulting in 24,422 ((14,490 + 111,872)-101,940). 

 

I kept the Old Formula for the [Projected Carry From Prior Month] metric in the workbook as it is made up of three calculations. The issue is when i bring in [LOD Actual Demand] I get the error of cannot mix aggregate and non-aggregate. No matter what I try I cant get the error to fix unless I break the [LOD Actual Demand] by taking off the additional SUM in the formula which results in the wrong answer. Any help would be greatly appreciated. Tried multiple  

 

Expected End Result of formula: 

Month 0 is 0 by default since there is no carryover. So for  

Month 0 the calc should show 0,  

Month 1 the calc should show 24,422 

Month 2 the calc should show 12,844 

Month 3 the calc should show 13,756 

Hoping there is a Fix for this LOD

 

 resources before asking here and they could not figure this out 

 

#Tableau Desktop & Web Authoring  #LOD  #Formulas  #Tableau

3 个回答
  1. 9月11日 23:16

    Hi, @Blake Swan 

    Thank you for checking.  

     

    In your original calculation field Projected Carry From Prior Month, the formula for LOD Pro C Month 1 matches what is shown in the figure, and it appears to be calculating correctly. 

    Hi, Thank you for checking.

      

    Could you provide some additional explanation on how you calculated the value you mentioned — “Month 1 the calc should show 24,422”  

0/9000

Hi everyone,

I’m trying to solve a Tableau issue involving FIXED LOD calculations, a Max Run Date context filter, row-level highlighting, and a blended data source.

Background

I have a dashboard with two sheets/tabs.

Sheet 1 – New Prescribers

This sheet identifies New Prescribers at the HCP level.

The sheet has the following filters:

  •  Max Run Date Flag = True — in context
  •  Trial = True 
  •  User Filter = True 
  •  Several territory/region dimensional filters 

My Avg Patients calculation is:

{ FIXED [NPI], [Month] :

AVG([unique_patients_yutrepia_winrevair_zinc_cvs])

}

My New Prescriber calculation is:

ZN([Avg Patients]) > 0

AND

{ FIXED [HCP] :

MAX(

IF [Run Date] < { MAX([Run Date]) }

AND ZN([Avg Patients]) > 0

THEN 1

ELSE 0

END

)

} = 0

Sheet 2 – Summary/Output Table

The second sheet is an output table that is being rendered through a SuperTable extension.

The row dimensions are approximately:

HCP

Institution

CPS Region

ALD Region

NPI

CPS Territory

ALD Territory

NPI Specialty

State

ZIP

...

The table also contains monthly patient measures such as:

Jun Est Pts

Jul Est Pts

Aug Est Pts

I am not displaying the New Prescriber field as a column.

Instead, I need to use New Prescriber only to highlight the entire row of the 5 New Prescribers in SuperTable.

The problem

Initially, I did not have Max Run Date Flag in context on Sheet 2.

I placed the New Prescriber field on Detail so that SuperTable could use it for row highlighting.

This worked correctly:

The table had the correct number of rows.

The 5 New Prescribers could be identified/highlighted.

However, I also have a ratio calculation involving two data sources:

Yutrepia Patients → Primary data source

Shipment Patients → Secondary/blended data source

Without Max Run Date Flag in context, the ratio does not return the expected values.

When I add Max Run Date Flag to Context

The ratio/counts become correct.

However, once Max Run Date Flag is in context, putting the New Prescriber field on Detail causes the table to split/increase rows.

For example, an HCP that should appear as one row can effectively get split because of the New Prescriber value at the underlying record level.

I don't want New Prescriber to change the existing row grain. I only want it to act as a highlighting flag.

So I currently have this conflict:

Setup Result

Max Run Date NOT in context Correct row count + New Prescriber highlighting works, but ratio is incorrect

Max Run Date IN context Ratio is correct, but New Prescriber on Detail causes additional/split rows

What I am trying to achieve

I need all of the following simultaneously:

Keep Max Run Date Flag as a context filter because it currently makes the blended ratio calculate correctly.

Identify the same 5 New Prescribers as Sheet 1.

Use the New Prescriber result only for row highlighting in SuperTable.

Do not add New Prescriber to the dimensional grain or create additional rows.

Keep the Yutrepia Patients / Shipment Patients ratio accurate.

Maintain the existing HCP/NPI/institution/etc. row structure.

My questions

1. Why does adding Max Run Date Flag to context cause the New Prescriber field on Detail to split/increase the rows?

I understand Tableau's order of operations, but I'm not clear on exactly how the context filter is interacting with my FIXED [HCP] calculation and the existing row grain.

2. Is there a way to calculate the New Prescriber flag at the HCP level and expose it to SuperTable without making it part of the mark's dimensionality?

For example, should I be using an aggregated version such as:

MIN([New Prescriber Flag])

or

ATTR([New Prescriber Flag])

instead of placing the dimension directly on Detail?

3. Is my current New Prescriber LOD logically correct when Max Run Date Flag is a context filter?

The calculation needs historical Run Dates because it checks:

[Run Date] < { MAX([Run Date]) }

But the context filter may be restricting the data before the FIXED LOD is evaluated.

Could this be the reason for the unexpected behavior?

4. Most importantly, how can I solve the ratio and highlighting requirements without increasing the row grain?

Would the recommended solution be to:

change the LOD,

create a separate HCP-level flag,

use a separate data source/relationship,

use a table calculation,

use an aggregated field on Detail,

or handle the Max Run Date differently?

One additional detail

The Avg Patients calculation is:

{ FIXED [NPI], [Month] :

AVG([unique_patients_yutrepia_winrevair_zinc_cvs])

}

while the New Prescriber logic is fixed at [HCP].

The output table itself contains several dimensions below/alongside HCP.

So I suspect there may be a grain mismatch between [NPI] + [Month], [HCP], and the output-table grain, but I'm not sure whether that is the actual root cause.

What would be the recommended Tableau approach to achieve this without duplicating/splitting the rows?

this is from databricks sourc and i don;t have access to those sources so couldn't share the .TWBX file part of confidential.

Thanks!

This correctly identifies 5 HCPs as New Prescribers

on Sheet 1. 

 

#Tableau Desktop & Web Authoring  #LOD

1 个回答
  1. 昨天,05:31

    Without having a look at your packaged workbook (twbx) and understand the complete data model, I cannot suggest a solution that would work. Having a blended data source often causes issues and so you may want to see if you can get rid of it and use it in a join or as a relationship.  

0/9000

I have a query with multiple CTEs and the various CTE's are joined.  I have successfully used 1 CTE in Tableau using initial SQL but have never faced a scenario like this with multiple CTEs.  Is this even possible?   

 

 

Thank you! 

 

 

 

#Tableau Desktop & Web Authoring

2 个回答
  1. 昨天,13:58

    @Luciana Suran

      

    Yes, it's absolutely possible — multiple CTEs use a SINGLE WITH keyword with the CTEs separated by commas (not a WITH per CTE), then you reference and join them in the final SELECT: WITH cte1 AS (...), cte2 AS (...), cte3 AS (...) SELECT ... FROM cte1 JOIN cte2 ON ... JOIN cte3 ON ... . Snowflake fully supports chaining CTEs like this, and a later CTE can reference an earlier one as long as you define them in dependency order. Since you're doing this in Initial SQL — which, unlike Custom SQL, is exactly where Snowflake temp tables are allowed — the clean pattern is to wrap the whole multi-CTE query in a temp table: CREATE OR REPLACE TEMPORARY TABLE my_stage AS WITH cte1 AS (...), cte2 AS (...) SELECT ... ; then just point your Custom SQL / data source at my_stage. That keeps the heavy joined-CTE logic on Snowflake and hands Tableau a simple flat table to read. if this helps, please mark it as the Best Answer so it helps the next person — thanks 🙂

0/9000

Hello All,

I’m using Tableau Desktop 2025.3 on an Apple Silicon Mac and connecting to our Tableau Server at:

https://mytableau.nameoforg.org

Issue summary:

Expected behavior:

Observed behavior:

  • fs.nameoforg.org appears to be treated as the Tableau Server during workbook open
  • Connection fails at that step

Environment:

Repro steps:

  1. Open Tableau Desktop
  2. Sign in to Tableau Server at https://mytableau.nameoforg.org
  3. Authenticate through the NYU login flow (https://fs.nameoforg.org)
  4. Return to Tableau Server and view available workbooks
  5. Select a workbook and click Open
  6. Tableau prompts for server sign-in again, showing https://fs.nameoforg.org
  7. Error appears: “Cannot connect to Tableau Server. Please check the server name and port and try again.”

I tried using agentforce to address this issue, and recommended using default browser to auth. I did the change and now this is the error that I'm getting:  

 

Unable to complete action 

Authentication failed. 

Error Code: 84223ADA 

Tableau received an OAuth error from your request.  Please see the error message for more information: Use JsonReader.setStrictness(Strictness.LENIENT) to accept malformed JSON at line 3 column 1 path $ 

See

https://github.com/google/gson/blob/main/Troubleshooting.md#malformed-json

 

Can't seem to get tableau to work on macOS. I can use it on a VDI on windows but I rather use my own hardware since it is faster.  

 

#Tableau Desktop & Web Authoring

0/9000

Hi everyone

I was exploring how to use Tableau for HR and payroll analytics, especially for UAE-based businesses.

I came across a UAE gratuity computation API that calculates end-of-service benefits based on salary and years of service.

Now I’m curious has anyone here tried connecting such external APIs (like HR or financial calculators) directly into Tableau dashboards?

I’m thinking about using it for visualizing total gratuity liability per department or employee group, but I’m not sure what’s the best way Web Data Connector or Tableau Prep script?

Would love to know how others here have handled API-based data visualization in Tableau .

4 个回答
  1. 9月9日 13:24

    Yes, this should be possible. The best approach depends on how often you need the gratuity data refreshed and whether the API supports the authentication method Tableau requires.

    For a relatively small amount of data, you could retrieve the API response and transform the JSON into a Tableau-friendly format before loading it into the dashboard. Tableau Prep can be useful if you need to clean, structure, or combine the API data with employee or department information.

    For recurring HR reporting, I would recommend keeping the API data in an intermediate database or structured data layer and letting Tableau connect to that source. This makes scheduled refreshes, auditing, and historical comparisons much easier.

    You could then use Tableau to analyze total gratuity liability by department, employee group, tenure, or salary range.

0/9000

The journey continues! 

Join us on the sixth stop on our Road To Certification 

This time, we're going beyond the basics to explore Tableau features that help you analyze data more effectively, add interactivity, and create more powerful visualizations. 

Filters, Sets, Bins, Parameters & More - by Viraj Bhargave, 4x Tableau Ambassador 

Viz Extensions in Tableau - by Klaus Schulte, Tableau Visionary (Hall of Fame) 

Register here https://tinyurl.com/yc7bd3tu

 

#Tableau #Tableau Next #Tableau Desktop & Web Authoring

0/9000

As many other posts have done, I'm trying to figure out a way to make default values in a lower filter for cascading filters. If I have two, single select drop down quick filters (I can only use single select drop down with the all option turned off in the customize menu; I cannot do multiple values list) and one is "School Level" and the other is "School Name", I need to create a filter action that will set School Name to a default element based on the choice of School Level. For example, if I have my School Level set to "Middle Schools" and my School Name is set to "ABC Middle School", then change my School Level to "Elementary Schools", I need School Name to change to an element within "Elementary Schools", say "XYZ Elementary School." I work to make school data more accessible than how it is currently reported and many of the families who use the dashboards I work on will struggle to access this tool if changing your school level makes the view go blank because the school you were looking at is not in the new level.

 

Someone recommended creating a reset button, but that doesn't actually solve the problem. If by default when you open the visualization my School Level is set to "Elementary Schools" and the School Name is set to "ABC Elementary School" (because the filters have to be set to something when you start and it can't be the all option), once you change your School Level to "Middle Schools," the problem is the first thing you encounter because the School Name filter is set to "ABC Elementary School" which is not a Middle School. Now, because you are confused, you press the reset button and are sent back to where you were before.

 

I've also seen this webpage titled How to dynamically set default values for quick filters and I've tried to recreate his steps, but I assume Tableau has changed how the filter action works since 2015 when the page came out. I've attached the workbook file below to see what I've tried there. His example used a field in the original Sample Superstore called Order Priority, but that no longer is included. To replicate the issue here, I used Sub-Category to act as the sub-filter for the action to affect, then limited it to 2021 and a few manufacturers since the data set is so big. When you click "Same Day" as the Ship Mode in the dashboard and set the Sub-Category to copiers, the Profit Per State view will go blank. It's likely I just don't know how to use filter actions correctly since I'm newer to Tableau, but any help would be appreciated.

 

I also found the setting default filter selections post, but it is based on the post mentioned above and I'm struggling to figure out how to parse out the issue I'm having.

 

Any help is greatly appreciated!

14 个回答
  1. 9月9日 10:31

    thanks for attaching your workbook Filters in Tableau do not Cascade - they are what is known as AND filters - selections on several dimensions all must return a True  when the filters are applied - you can use cascading parameter values - see https://jimdehner.com/2021/10/04/sets-and-filters-the-condition-and-top-n-tabs-what-do-they-do/  the 7th example show how it is done with the addition of a dashboard extension - 

0/9000

Hi everyone, I’m looking for some help with a Tableau dashboard I’m building. I’ve attached screenshots of my current worksheets and the dashboard layout.

 

I have

multiple athletes displayed on the same dashboard, and each athlete has their own position filter. For example, Athlete 1 could be benchmarked as a GS while Athlete 2 could be benchmarked as a GA.

 

For each statistic, I want the athlete’s

AVG/Q to automatically colour:

  • 🟢 Green = above their selected position’s League Avg/Q
  • 🟡 Yellow = equal to the League Avg/Q
  • 🔴 Red = below the League Avg/Q

The main issue is that the athlete AVG/Q and League Avg/Q are on separate worksheets. I need the position selection to change the League Avg/Q benchmark, but I don’t want it to filter the athlete’s own statistics, as their AVG/Q should remain their total for the match.

 

I also need each athlete’s position selection to work

independently. Changing Athlete 1 from GS to GA, for example, shouldn’t change the benchmark selected for Athlete 2.

I need this to work across multiple stats such as CPR/Q, Feeds/Q, Assists/Q, Gains/Q, etc.

 

What would be the best way to set this up in Tableau so the conditional colouring works correctly?

Thanks for any help! 

 

#Tableau Desktop & Web Authoring

7 个回答
0/9000

Im customizing an oauth web data connector 3.0 so I can pull data from a graphql endpoint. Has anyone attempted to do this before? I keep getting a 405 Method not allowed error even though my code indicates "POST" 

 

#Tableau Desktop & Web Authoring

2 个回答
  1. 9月8日 20:30

    Hi Rajneesh,  

     

    My endpoints work in Postman so I belive its a Tableau issue but im not sure how to resolve it. Im not using GET anywhere within my code. 

0/9000

Litify + Tableau + Salesforce

I’m trying to pull information from Intakes and Matters and connect the two using a join, but I can’t seem to find the correct key/field to link them.

I reached out to Tableau Support, and they told me I would need to use SQL to pull the Matter information and that I wouldn’t be able to use joins.

Has anyone else run into this issue or found a way to connect Intakes and Matters in Tableau?

Any advice on which fields/keys to use would be greatly appreciated! 

 

#Tableau Desktop & Web Authoring

1 个回答
0/9000