Custom (re)ordering of legend/bar segments in Einstein Analytics

Problem:

Recently I tacked with the problem of ordering the legend/bar segments in Einstein Analytics and this is how I solved it.

Using the Einstein Analytics user interface, I could sort bar segments of a stacked column chart in asc/desc order or keep it unsorted. However, I needed to sort them in a custom fashion like in the image. 

Apparently, its possible by using custom SAQL and with final touches using the extended meta data a.k.a XMD.

Solution:

if you are familiar with Einstein Analytics, you know this one 😉




Then you need to add a similar code like the following into the SAQL code:

q = foreach q generate (case 
when 'Fruits__c' == "Berry" then "03 Berry" 
when 'Fruits__c' == "Apple" then "02 Apple" 
when 'Fruits__c' == "Orange" then "01 Orange" 
end) as 'Fruits__c';

After this step, the legend is going to show its contents with numbers in front. To fix this using the eXtended Meta Data (XMD) .json file.

Go ahead download the XMD.json file after clicking “edit” dataset. As seen in the screenshot below, click “download” to get the latest .json file.

you will see it, when you click ‘edit’ dataset

Now you need to edit the “dimensions” part like in the example code below. Define the member and label fields, if you want to override the color as well then also color too.

Next step is to replace the XMD .json file. Click the ‘replace‘ button and upload the updated file.




{"dataset":{},"dates":[],"derivedDimensions":[],"derivedMeasures":[],
    "dimensions" : [
  {  
    "field":"Fruits__c",
    "linkTemplateEnabled": false,
    "members":[  
      {  
        "color":"#EB271F",
        "label":"Orange",
        "member":"01 Orange"
      },
      {  
         "color":"#F7B92B",
         "label":"Apple",
         "member":"02 Apple"
      },
      {  
         "color":"#FD9226",
         "label":"Berry",
         "member":"03 Berry"
      }
    ],
    "recordDisplayFields": [],
    "salesforceActions": [],
    "salesforceActionsEnabled": false,
    "showInExplorer": true
  }
],"measures":[],"organizations":[],"showDetailsDefaultFields":[]}

Niceness! Now you have an ordered/coloured legend/bar segments in the stacked column chart and no more misleading/confusing numbers in front the legend elements.




Einstein Analytics Building a Data Flow

Before you start with this post, make sure that you already read “Salesforce Einstein Analytics” post.




Here we are climbing the steps of building a dataset by forming our very first dataflow. Don’t forget, it all starts with data and it’s better to have data of good quality. If you know the data that you’re working on, if you understand it well then Einstein Analytics will make your data easy peasy for you to interpret and visualize. In other words, make sure you know what to achieve with your data and have a good use case in hand, for validation and testing purposes.

Put your hands in the air, then on the keyboard & trackpad. 🙂 We are good to go.

Remember the ‘create‘ button? You should be also remembering the SampleDataset and SampleDataflow titles. Next step is to pick the Salesforce or custom objects you have in the org and the fields that you want to include in the dataflow. When you click on it, the wizard will already take you to the next step.

Now it is time to click on the object (the initial selection) and pick the fields you want to use (to be included in the dataset) also select the connections to other Salesforce standard or custom objects. You can select Fields and Relationships and each join click will make you access to another object and its fields. The wizard is a great help to get any field and object in the org.

Einstein Analytics team together made it really handy. If you already know the objects you are going to work with, simply selecting the parent (the top object) will give you an advantage. Joining a new object and selecting new fields will be simple clicks.




Go ahead! Play with the wizard, experiment, fail, break and learn how to use it with confidence and success. You can select the main node of the tree then add branches, like in this example. Once you are done with the wizard, you need to navigate and click Next.






When you are done with the selections and click next, then your dataflow will be prepared by the wizard for an easier data engineering progress. Dataflow manager will generate the simple and complex dataflow, with respect to your selections. The dataflow may look like the screenshot below, but this screenshot is not the best possible one. It may differ with every other dataflow preperation.

Now we can get our hands dirty and dive into the world of manual dataflow manipulations, changes, fixes and building brand new dataflows from scratch. I hope you already are familiar with Transformations for Analytics Dataflows, if not check the post I linked above.

To be continued…



Salesforce Einstein Analytics






Get your data in!

It all starts with the data anyway, so you need to bring it in. How? Salesforce made it handy.

Once you login to your Einstein Analytics enabled org, click on the App Launcher and select Analytics Studio. Search for the ‘Create’ button and select ‘Dataset’. Here you have two options ‘CSV File’ or ‘Salesforce’. Here is a sample dataset. If you want to use the Salesforce native or custom objects in your org, then you need to select ‘Salesforce’. At this step basically you are transforming the existing data (from .csv files or salesforce objects) into an Einstein Analytics dataset.




Data Source Selection

CSV File:
I will write about this later.

Salesforce:
If you choose Salesforce, you need to give a ‘Dataset Name’ and either create a new dataflow or choose an existing one. If this is your first trial, just name the dataset and select ‘add to new dataflow’ remind that you also need a name for the dataflow as well. I always use the same name for all, Dataset, Dataflow, Dashboard, Application, Lens but this is something you need to figure out yourself.

Now you see the list of existing Salesforce objects. What you need to do is select an object, select the fields of the object that you want to include in the dataset, then the same for the next object which is related and its fields. If you made sure that you included all the objects and fields then you are ready to move forward with dataset creation.

Before you create the dataset, you will see the dataflow manager. Here you’ll see automatically generated nodes and the relations between these nodes. These nodes are actually shows the dataflow transformations. I will explain them in the next posts in detail but go train yourself a little in advance. Transformations for Analytics Dataflows.




Do you want to learn more about Einstein Analytics, first you need a Free Einstein Analytics enabled Developer org. You can get one from here.

Kripto Para – Bitcoin, Ethereum, Litecoin ve diğerleri





Son iki senedir, üzerinde sıkça konuşulan yatırım araçlarından biri Bitcoin, eminim sizde haber sitelerinde, arkadaş ortamlarında ya da finans bültenlerinde bu terimi çokça duymuşsunuzdur. Kripto paralar arasında en ünlü para birimi olan Bitcoin, Wikipedia’da “Bitcoin (sembolü: ฿, kısaltma: BTC) herhangi bir merkez bankası, resmi kuruluş, vs. ile ilişiği olmayan elektronik bir para birimidir.” olarak tanımlanıyor. Kripto paraları içeren bu ağ, 2009 yılında Satoshi Nakamoto (kim olduğu bilinmeyen gizemli kişilik) tarafından ortaya atılan konsept ile kurulmuştur, asıl amacı para transferlerinde ödenen yüksek miktarlardaki komisyonlardan kurtulmaktır. Maksimum Bitcoin sayısı 21 milyonla sınırlıdır.

1 Bitcoin’in 2012 yılındaki fiyatı 10-50 dolar arasındayken, 29 Kasım 2017 tarihinde bu para birimi 11000 dolar civarında işlem görmüştür.

Avrupa’da yaşıyorum nereden güvenli bir şekilde Bitcoin, Ethereum ya da Litecoin satın alabilirim? Cevap basit bitcoin.de. Hesabınızı açın, güle güle kullanın!




ya da Coinbase üzerinden hesap açıp, bu dijital para birimlerine yatırım yapabilirsiniz. Coinbase daha yaygın kullanılan bir site ancak komisyon alıyorlar.

Güncelleme:
Bitcoin ya da herhangi bir kripto para birimi saklama yollarından biride kağıt cüzdan kullanmaktır. Peki nedir bu kağıt cüzdan, 10 kısa adımda anlatalım?




Kripto Para Birimleri için Kağıt Cüzdan Nasıl Oluşturulur?

1. Bitcoin için BitAddress.org üzerinden bitcoin adresinizi oluşturun (Litecoin için liteaddress.org).
2. Bitaddress.org sizden rastgele bir rakam oluşturmanızı isteyecek, bunu klavyeniz tuşlarına dokunarak ya da farenizi rastgele sağa sola aşağı yukarı oynatarak oluşturabilirsiniz.
3. Size bir public ve private anahtarlar ve bunlara ait QR kodlar (bir tarz barkod) sunulacaktır. Yalnız dikkat edin, bu QR kodları tarayıcınız ile okutmayın.
4. ‘Paper wallet’ sekmesine tıklayın.
5. Üretmek isteğiniz adreslerin sayısını girin.
6. Eğer bitcoin resimlerini istemesseniz ‘Hide art?’ tuşuna tıklayabilirsiniz.
7. Yeni cüzdanlar üretmek için ‘Generate’ tuşuna tıklayın.
8. Cüzdanlar üretildikten sonra ‘Print’ tuşuna tıklayarak, cüzdanları yazınızdan kağıt üzerine bastırın.
9. İsterseniz PDF dokümanı şeklinde de güvenli bir ortama kaydedebilirsiniz.
10. Public adresleri not alın ya da bitcoin (litecoin) uygulamalarınızı kullanarak QR kodları okutun.




Daha fazla bilgi için Coindesk‘i ziyaret edebilirsiniz.

Graphics Design: Logo

Collact.me was planned to be a complimentary social media monitoring application. Here is the logo for it.



Collact.me was planned to be a complimentary social media monitoring application. Here is the logo for it.

Graphics Design: Logo

One of my colleagues in the university asked me to design a logo representing a pipeline for the ancient genome projects. So I did, here is the logo.




Graphics Design: Logo





In 2015, I designed the logo of the ‘Quantitative Biology Center’ in Tübingen. It was a in-house design contest with more than five logo designs. I won the design.
Small compact version:

Large extended version: