Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
My raw data look like below. I created master item for Measurement as below.
(sum({<[PRODUCT_NAME]={'GASOHOL E20', 'GASOHOL E85'}>} [QTY_LITRE]) / sum(QTY_LITRE)
to represent %E20orE85 Consumption per User Name.
Date | User Name | Product_Name | QTY_LITRE | %E20orE85Consumption |
01/01/2021 | AAAA | E20 | 20 | |
02/01/2021 | AAAA | E85 | 30 | |
03/01/2021 | AAAA | DIESEL | 15 | |
01/01/2021 | BBB | DIESEL | 10 | |
02/01/2021 | BBB | DIESEL | 20 | |
03/01/2021 | BBB | DIESEL | 30 |
The question is
1. How can I have a filter pane on Dashboard to show as below criteria
Definition | E20 or E85Consumption |
ACTION NEEDED | E20 or E85 = 0 % |
Need Improvement | E20 or E85 < 80% |
GOOD | E20 or E85 > 80% |
EXCELLENT | E20 or E85 = 100% |
2. How can I create each KPI to count no. of transaction as above criteria.
Please give me an advice. Thank you.
hi,
find the script
Gas:
LOAD
"DATE",
UserName,
Product,
"QTY(L)"
FROM [SSSS1.xlsx]
(ooxml, embedded labels, table is gasolain)
where WildMatch(Product,'GASOHOL*');
hi:
Load
Product as TProduct,
Sum("QTY(L)") as Tot
Resident [Gas]
Group by Product;
result and expression
further you use if condition to get classification of Definitions,
ksrinivasan
hi,
use this expression as Measure
=if(((Sum({$<Product={'GASOHOL E20', 'GASOHOL E85'}>} [QTY(L)]))/Sum(Tot))='0','Action Need',
if(((Sum({$<Product={'GASOHOL E20', 'GASOHOL E85'}>} [QTY(L)]))/Sum(Tot))>'0' and
((Sum({$<Product={'GASOHOL E20', 'GASOHOL E85'}>} [QTY(L)]))/Sum(Tot))<'80','Need Improvement',
if(((Sum({$<Product={'GASOHOL E20', 'GASOHOL E85'}>} [QTY(L)]))/Sum(Tot))>'80' and
((Sum({$<Product={'GASOHOL E20', 'GASOHOL E85'}>} [QTY(L)]))/Sum(Tot))<'99','Good',
if(((Sum({$<Product={'GASOHOL E20', 'GASOHOL E85'}>} [QTY(L)]))/Sum(Tot))='100','Excellant',''))))
result
ksrinivasan
Hi,
Can you please attach sample QVD?
Thanks
Hi,
How to attach the file? There is no function to attach file here.
Hi Usama,
Please find the attached qvd file
It seems like I can't attach qvd file. there was an error
No worries.
To add in filter pane: You have to create it as a dimension in script using if conditions and for KPI you can use this dimension in set analysis to get the count.
Thanks
Hi Usama,
Could you please give me a sample script for this .
Could you please attach sample dataset I need it to test first before giving you solution
Hi Usama,
Thank you for your reply. Please find attached below.
How you are calculating consumption here as you mentioned in the expected output?