Skip to main content

#Step0 diskutieren mit

1 Antwort
  1. 6. Apr. 2022, 00:00

    Hi @MJ P.​ 

    I believe the default hierarchy drills down one level at a time, so to achieve what you are expecting we can make use of Sets or Parameter dashboard actions.

     

    I my example I have used a Parameter action to drill down to the lowest level of the hierarchy. Check if this solution helps in your case.

     

    ⌗Step1 - Place all the fields which forms an hierarchy in Rows shelf (I have used Product hierarchy from Sample SuperStore data)

     

    #Step 2 - Create a Parameter - e.g. p_Category, which have values from your Top level field of the hierarchy and add an extra value say "+"

    Hi @MJ P.​ I believe the default hierarchy drills down one level at a time, so to achieve what you are expecting we can make use of Sets or Parameter dashboard actions.#Step 3 - Create calculated fields for all the other levels of the hierarchy using below logic

    image.png

    IF [Category]=[p_Category] THEN

    [Sub-Category]

    ELSE

    '+'

    END

     

    //Manufacturers

    IF [Category] = [p_Category] THEN

    [Manufacturer]

    ELSE

    '' // you can use a + sign as well, however I used a blank for asthetics purpose

    END

     

    //Product_Name

    IF [Category]=[p_Category] THEN

    [Product Name]

    ELSE

    ''

    END

    #Step 4 - Place the sheet in the dashboard to setup the Dashboard Parameter action

    imageOnce set you can then drill down to the lowest level from the topmost level.

    Attached is the workbook.

     

    Let us know if this help resolves your query, by marking the answer as "Best" , which will close the thread and make the solution easier for others to find. 

    Thanks!!

0/9000

I am just testing the Data Extract API and cannot get it to work even after watching the video and nearly copying the code word for word. What am I doing wrong?

My code:

import dataextract as tde

import csv,os,datetime

 

#Step 1: Create the extract file and open the .csv

try:

    tdefile = tde.Extract('APITest.tde')

except:

    os.remove('APITest.tde')

    tdefile = tde.Extract('APITest.tde')

 

csvReader = csv.reader(open('U:/Neil/Tableau/APITest.csv','rb'), delimiter=',',quotechar='"')

 

#Step 2: Create the tableDef

tableDef = tde.TableDefinition()

tableDef.addColumn('ID', tde.Type.CHAR_STRING)        #1

tableDef.addColumn('LOB', tde.Type.CHAR_STRING)         #2

tableDef.addColumn('GL Acct Num', tde.Type.CHAR_STRING) #3

tableDef.addColumn('CY YTD', tde.Type.DOUBLE)           #4

tableDef.addColumn('CY Audit ME', tde.Type.DOUBLE)      #5

tableDef.addColumn('CY Jan', tde.Type.DOUBLE)           #6

tableDef.addColumn('PY Jan', tde.Type.DOUBLE)           #7

tableDef.addColumn('PY Audit ME', tde.Type.DOUBLE)      #8

tableDef.addColumn('PY Dec', tde.Type.DOUBLE)           #9

tableDef.addColumn('PPY Jan', tde.Type.DOUBLE)          #10

tableDef.addColumn('PPY Audit ME', tde.Type.DOUBLE)     #11

tableDef.addColumn('PPY Dec', tde.Type.DOUBLE)          #12

 

#Step 3: Create the table in the image of the tableDef

table = tdefile.addTable('Extract',tableDef)

 

#Step 4: Loop through csv, grab data, put into rows, insert rows into table.

newrow = tde.Row(tableDef)

csvReader.next()

for line in csvReader:

    newrow.setCharString(0, str(line[0]))

    newrow.setCharString(1, str(line[1]))

    newrow.setCharString(2, str(line[2]))

    newrow.setDouble(3, float(line[3]))

    newrow.setDouble(4, float(line[4]))

    newrow.setDouble(5, float(line[5]))

    newrow.setDouble(6, float(line[6]))

    newrow.setDouble(7, float(line[7]))

    newrow.setDouble(8, float(line[8]))

    newrow.setDouble(9, float(line[9]))

    newrow.setDouble(10, float(line[10]))

    newrow.setDouble(11, float(line[11]))

    newrow.setDouble(12, float(line[12]))

    table.insert(newrow)

 

#Step 5: Close the tde

tdefile.close()

 

My error:

Traceback (most recent call last):

  File "C:/Python27/APIDataExtractTest.py", line 29, in <module>

    table = tdefile.addTable('Extract',tableDef)

  File "C:\Python27\lib\site-packages\dataextract\Base.py", line 484, in addTable

    raise Exceptions.TableauException(result, wstring_at(tablib.TabGetLastErrorMessage()))

TableauException: TableauException (303): duplicate table name

2 Antworten
  1. 15. Juli 2014, 22:06

    Your issue must be related to the TDE file (APITest.tde) not getting deleted when you run the script more than once. First thing to try is to manually delete the APITest.tde file & see if the error still happens. If it works after manually deleting the file, it means that the script is not able to delete the file on its own. If that is the case, you would have to troubleshoot why your script can't delete the file. Some possible reasons:

     

    * The try statement is not causing an exception, so the script does not actually delete the file.

    * You have the TDE file open in Tableau Desktop

    * You do not have user permissions to delete the file

     

    When I tried running this script on my machine, I ran into the same issue. It appears that the try statement does not cause an exception, so the line with "os.remove... " is _never_ called. I fixed the problem by always calling os.remove("APITest.tde") before attempting to create a new extract.

     

    Let us know how this plays out,

     

    -Steve

0/9000

Hi Guys !

 

I use Data Extract API to create some tde files. I want to refresh the file each day but I don't find how to do. I can only re-create the file. How to do to not re-load all data.

 

Someone did this already ?

 

Thanks for your help !!

 

Gaëlle

9 Antworten
  1. 17. Dez. 2013, 14:34

    Hi Gaelle -

     

    Currently, The API is used to create extracts, not refresh them in the Tableau Desktop/Server sense of the word.

     

    In 8.1,  you can also use the API to append new rows to an existing extract, but it would be up to you to figure out which (new) rows need to be appended.

0/9000

hello , I can't finish last task #step 2 :( tried many times and dont know what I'm doing wrong. the error is  as below

I found some answers in google but they dont help in my case. I know what the correct filter should be set up but the problem is that when I'm trying to search for the right filter -on the drop down list the option which I'm expected to see doesn't show . I dont know why.  On the dropdown there is no option "Volunteer Organization: Volunteer Organization Status"  or  "Volunteer Organization: Account Record Type"

 

#Trailhead Challenges

Superbadge App Customization Specialist step 2

Capture.JPG

4 Antworten
  1. Ines Garcia (get: Agile) Forum Ambassador
    8. Sept. 2021, 11:34

    Fab! thanks to confirm back to the community, happy trailbalzing

0/9000

hey Folks

 

i have 2 approval chains.

so approval chain C1

step 1 - User A

 

approval chain C2

step 1 - User B

step 2 - User A

 

In most cases User B approved first in chain C2 (99.99% of times as User B reports into User A in the org)

 

currently User A gets 1 email for Step 1 in C1 and then another email when User B approves in chain C2(before user A approves step 1 in C1). 

 

is there a way to make the system send only one email per user irrespective of how many ever steps/chains they are part of?

 

thanks in advance folks, stay safe.

2 Kommentare
0/9000

I want to start learning Salesforce. I have no past experience related to IT. It will be great if somebody can guide me since Salesforce is huge and I want to go step-by-step and learn each and every component of Salesforce applications. What could be the best way?

0/9000

Hi guys!

 

I'm trying to make Lightning Experience Specialist - superbadge. And I'm stuck in step 8.

 

At the moment I need two helpers, the first one is: How do I post to the developer forum? I don't know if it's because I'm nervous, but I didn't find the option to post.

 

Regarding the step I tried to follow this topic but I was unsuccessful and am having difficulty deleting the data, if anyone can help me I would be very grateful.: https://developer.salesforce.com/forums/?id=9060G000000XbPEQA0

6 Kommentare
0/9000

I am trying to create a process for next step history field in the process builder. My process gets invoked by a next step change formula 

 

"AND( 

ISCHANGED( [Opportunity].Next_Step__c  ), 

NOT ( ISBLANK(PRIORVALUE ( [Opportunity].Next_Step__c  )) ) 

)"

 

I am having trouble creating the formula to populate the next step history field with the date & time and the previous next step. Any thoughts on what this formula should be? 

10 Kommentare
  1. 10. Juli 2019, 20:12

    No it should be okay (back download a backup file of everything just in case).

    Your Field Update Formula would be something like this

    [Opportunity].TextArea_Field__c +" *** Last Updated By: "+

    $User.FirstName +" "+$User.LastName + " on "+

    TEXT(NOW()) + "Next Step: " +

    [Opportunity].NextStep +" *** "

0/9000

Hi Everyone,

 

Is there a way to control the selectmode of a step (i.e. none, single, singlerequie, etc) by binding? we will need to find a way to dynamically control the selectmode of one step? Thanks in advanced.

3 Kommentare
0/9000

hello everyone,

I have an issue. my dataset has a field "Name" from Product. I created a step as count and bar as product Name. when I put that step in chart or list ..Product name "accoustifold" is not coming in that chart/list..but it's showing in that step lens. I tried filter also but not working.

I share the screenshot below and in comments also

4 Kommentare
0/9000