Mar 22, 2023

Hide/show field based on dropdown selection in QlikSense

Inline table in the query editor for drop down static list:

Scenario_Comp_Filter:

Load * inline [

MID,Measure

1,"Sales"

2,Percentage

];

Dropdown selected values in the aggreegate.

If(GetSelectedCount(Measure)=0,Num(Sum([Sales]),'#,##0'),

 Pick(Match(MID,'1','2'),

Num(Sum([Sales]),'#0.00%'),

Num(Sum(Percentage),'#,##0'),


//Num(Sum([Sales]),'$###,##0'),  


))

Use below expression in Show condition of the field. 


 If(GetSelectedCount([Level 1]) > 0 ,$(=SubStringCount(Concat([Level 1],'|'),'Field1')),0)



Oct 27, 2021

Power BI filter using URL parameter

 https://app.powerbi.com/groups/9xyz64-xyzd-xyz5-xyz8-cfx/reports/9xyz64-xyzd-xyz5-xyz8-cfxyzdexyz/ReportSectiondxyz?filter=TableName/FielName eq 'Boo'

Dec 14, 2020

Spotfire Hide show control based on list box selection

$("#showHidecontainer").hide();

$('#Ant').click(function(){

var PrdVal = $("#Ant .sfpc-selected").text();

if (PrdVal == "Test")

{

$("#showHidecontainer").show();  

}

else

{

$("#showHidecontainer").hide();  

}; 

}); 

Jan 2, 2019

data lake store - Power BI and convert data to CSV format

https://docs.microsoft.com/en-us/azure/data-lake-store/data-lake-store-power-bi

Aug 6, 2018

export to csv in Spotfire web player. with custom message on header

# Copyright © 2017. TIBCO Software Inc. Licensed under TIBCO BSD-style license.
from System.IO import *
from Spotfire.Dxp.Application.Visuals import VisualContent
vc=Visuals.As[VisualContent]()  #Visuals = Script parameter for Table/Cross Table visualization
memStream = MemoryStream();
sWriter = StreamWriter(memStream);
#Exporting the data to Memory Stream
vc.ExportText(sWriter);  #exports data in tab separated text
sReader = StreamReader(memStream);
memStream.Seek(0, SeekOrigin.Begin);
filename="C:\WebPlayer\spotfireexport.csv"
f=open(filename,"w")
f.write('This report is provided to support ABC project. \n\n')
counter=0
j=0
str1=''
while (sReader.Peek()>=0):
line=[]
counter=counter+1 #counts the number of rows in dataset
a=sReader.ReadLine()
lines=a.split("\t")
for elem in lines:
j=j+1 # counts the number of columns in dataset
print elem
if str(elem).find(",")<>-1:
elem='"'+elem+'"'  # escaping comma already present in string
line.append(elem)
str1 = ','.join(str(e) for e in line)
f.write(str1+'\n')
f.close();
MemoryStream.Dispose(memStream);
sReader.Close()

from Spotfire.Dxp.Application.Visuals import HtmlTextArea
html = None
for vis in Document.ActivePageReference.Visuals:
 if vis.Title == 'HTML':
  html = vis.As[HtmlTextArea]()
  html.HtmlContent =  '

Click here to download CSV'